/* ==========================================================================
   ACTIVATION.MG — DESIGN SYSTEM UNSLOPPED (v19.0 — unslop by @heydamir)
   Rampes neutres Graphite/Ink • Grille 4px • Rayons imbriqués (16/10/6px)
   Chiffres tabulaires (tabular-nums) • Zéro dégradé violet / Zéro néon
   ========================================================================== */

:root,
[data-theme="light"] {
    --bg-page: #FAFAFA;
    --bg-card: #FFFFFF;
    --bg-subtle: #F4F4F5;
    --bg-elevated: #FFFFFF;
    --bg-header: rgba(250, 250, 250, 0.92);

    --text-main: #171717;
    --text-sec: #525252;
    --text-muted: #737373;

    --border: rgba(23, 23, 23, 0.08);
    --border-strong: rgba(23, 23, 23, 0.14);

    --brand: #E5484D;
    --brand-hover: #DC2626;
    --brand-soft: rgba(229, 72, 77, 0.08);

    --indigo: #171717;
    --indigo-soft: rgba(23, 23, 23, 0.06);

    --emerald: #16A34A;
    --emerald-soft: rgba(22, 163, 74, 0.08);

    --whatsapp: #16A34A;
    --whatsapp-soft: rgba(22, 163, 74, 0.1);

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.04), 0 8px 24px rgba(0, 0, 0, 0.04);
    --shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.08);

    --ease-out-expo: cubic-bezier(0.22, 1, 0.36, 1);
    --ease-spring: cubic-bezier(0.22, 1, 0.36, 1);
}

[data-theme="dark"] {
    --bg-page: #141415;
    --bg-card: #19191B;
    --bg-subtle: #232325;
    --bg-elevated: #232325;
    --bg-header: rgba(20, 20, 21, 0.92);

    --text-main: #EDEDED;
    --text-sec: #A1A1A6;
    --text-muted: #85858B;

    --border: rgba(237, 237, 237, 0.08);
    --border-strong: rgba(237, 237, 237, 0.14);

    --brand: #E5484D;
    --brand-hover: #F2555A;
    --brand-soft: rgba(229, 72, 77, 0.14);

    --indigo: #EDEDED;
    --indigo-soft: rgba(237, 237, 237, 0.08);

    --emerald: #4CC38A;
    --emerald-soft: rgba(76, 195, 138, 0.12);

    --whatsapp: #4CC38A;
    --whatsapp-soft: rgba(76, 195, 138, 0.14);

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
    --shadow-card: inset 0 1px 0 rgba(255, 255, 255, 0.04);
    --shadow-hover: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 8px 24px rgba(0, 0, 0, 0.35);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-page);
    color: var(--text-main);
    line-height: 1.5;
    font-variant-numeric: tabular-nums;
    transition: background-color 180ms var(--ease-out-expo), color 180ms var(--ease-out-expo);
    overflow-x: hidden;
}

h1, h2, h3, h4, .font-display {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 500;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
}

.mono {
    font-family: 'JetBrains Mono', monospace;
    font-variant-numeric: tabular-nums;
}

button, input, select, textarea {
    font-family: inherit;
    color: inherit;
}

a {
    text-decoration: none;
    color: inherit;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ==========================================================================
   SYNCHRONIZED MOTION (SINGLE EASING CURVE, NO BOUNCY SPRINGS OR LOOPS)
   ========================================================================== */
@keyframes cardReveal {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pricePop {
    0% { opacity: 0.55; }
    100% { opacity: 1; }
}

.price-animate {
    animation: pricePop 160ms var(--ease-out-expo);
}

/* ==========================================================================
   1. STICKY MARKETPLACE HEADER (64PX HEIGHT, 4PX GRID, QUIET CHROME)
   ========================================================================== */
.top-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--bg-header);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    transition: background-color 180ms var(--ease-out-expo), border-color 180ms var(--ease-out-expo);
}

.header-row {
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    font-size: 18px;
    letter-spacing: -0.02em;
    flex-shrink: 0;
}

.brand-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: var(--bg-subtle);
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: center;
}

.brand-logo span.dot-mg {
    color: var(--brand);
}

/* Search Bar (Nested radius 8px, 40px height) */
.header-search {
    flex: 1;
    max-width: 420px;
    position: relative;
}

.header-search input {
    width: 100%;
    height: 40px;
    background: var(--bg-subtle);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0 16px 0 38px;
    font-size: 14px;
    outline: none;
    transition: border-color 150ms var(--ease-out-expo), background-color 150ms var(--ease-out-expo);
}

.header-search input:focus {
    border-color: var(--border-strong);
    background: var(--bg-card);
}

.header-search .search-svg {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.curr-pill {
    display: inline-flex;
    background: var(--bg-subtle);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 4px;
}

.curr-btn {
    border: none;
    background: transparent;
    color: var(--text-sec);
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    font-weight: 500;
    padding: 4px 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 150ms var(--ease-out-expo), color 150ms var(--ease-out-expo);
}

.curr-btn.active {
    background: var(--bg-card);
    color: var(--text-main);
    box-shadow: var(--shadow-sm);
}

.icon-btn {
    height: 36px;
    padding: 0 12px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    font-size: 13px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: border-color 150ms var(--ease-out-expo), background-color 150ms var(--ease-out-expo), transform 120ms var(--ease-out-expo);
}

.icon-btn:hover {
    border-color: var(--border-strong);
    background: var(--bg-subtle);
}

.icon-btn:active {
    transform: scale(0.98);
}

.icon-btn.client-space-btn {
    background: var(--text-main);
    color: var(--bg-page);
    border-color: var(--text-main);
}

.icon-btn.client-space-btn:hover {
    opacity: 0.92;
    background: var(--text-main);
}

.badge-pill {
    background: rgba(128, 128, 128, 0.18);
    color: inherit;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    font-weight: 500;
    padding: 2px 6px;
    border-radius: 4px;
    font-variant-numeric: tabular-nums;
}

/* ==========================================================================
   2. HERO PROMO BANNER (CALM GRAPHITE SURFACE, ASYMMETRIC SPLIT, NO PURPLE)
   ========================================================================== */
.promo-banner {
    margin: 24px 0;
    background: #141415;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 32px;
    color: #EDEDED;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
    box-shadow: var(--shadow-card);
    position: relative;
    overflow: hidden;
}

.promo-left {
    max-width: 600px;
    z-index: 2;
}

.verified-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #19191B;
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 400;
    color: #A1A1A6;
    margin-bottom: 16px;
}

.live-pulse {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #4CC38A;
}

.promo-left h1 {
    font-size: clamp(28px, 3.2vw, 36px);
    font-weight: 500;
    line-height: 1.12;
    letter-spacing: -0.025em;
    margin-bottom: 12px;
    color: #EDEDED;
}

.promo-left h1 span {
    color: #EDEDED;
    text-decoration: underline;
    text-decoration-color: var(--brand);
    text-underline-offset: 6px;
    text-decoration-thickness: 2px;
}

.promo-left p {
    color: #A1A1A6;
    font-size: 15px;
    line-height: 22px;
    max-width: 52ch;
}

.promo-right {
    background: #19191B;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 300px;
}

.operator-chips {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.op-chip {
    background: #232325;
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    color: #EDEDED;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* ==========================================================================
   3. CATEGORY FILTER STRIP (8PX RADIUS, 16PX STROKE-1.5 ICONS, QUIET ACTIVE)
   ========================================================================== */
.cat-strip {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    margin-bottom: 24px;
    scrollbar-width: none;
}

.cat-strip::-webkit-scrollbar {
    display: none;
}

.cat-pill {
    height: 36px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-sec);
    padding: 0 14px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: border-color 150ms var(--ease-out-expo), background-color 150ms var(--ease-out-expo), color 150ms var(--ease-out-expo);
}

.cat-pill svg {
    width: 16px;
    height: 16px;
    color: var(--text-muted);
    flex-shrink: 0;
}

.cat-pill:hover {
    border-color: var(--border-strong);
    color: var(--text-main);
}

.cat-pill.active {
    background: var(--text-main);
    color: var(--bg-page);
    border-color: var(--text-main);
}

.cat-pill.active svg {
    color: var(--bg-page);
}

/* ==========================================================================
   4. GAMSGO INTERACTIVE CARDS (16PX CARD -> 10PX SELECTOR -> 6PX INNER BTN)
   ========================================================================== */
.gamsgo-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 48px;
}

.gg-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-card);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    animation: cardReveal 320ms var(--ease-out-expo) both;
    animation-delay: calc(var(--i, 0) * 40ms);
    transition: border-color 150ms var(--ease-out-expo), box-shadow 150ms var(--ease-out-expo);
}

.gg-card:hover {
    box-shadow: var(--shadow-hover);
    border-color: var(--border-strong);
}

.gg-card-head {
    padding: 20px 20px 16px;
    background: var(--bg-card) !important;
    border-bottom: 1px solid var(--border);
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.gg-brand-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.gg-logo {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: var(--bg-subtle);
    border: 1px solid var(--border);
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.gg-title h3 {
    font-size: 16px;
    font-weight: 500;
    line-height: 20px;
    color: var(--text-main);
}

.gg-title span {
    font-size: 12px;
    line-height: 16px;
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
}

.gg-save-badge {
    background: var(--bg-subtle);
    border: 1px solid var(--border);
    padding: 4px 8px;
    border-radius: 6px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    font-weight: 500;
    color: var(--emerald);
    font-variant-numeric: tabular-nums;
    flex-shrink: 0;
}

.gg-card-body {
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    flex: 1;
}

.gg-label {
    font-size: 12px;
    line-height: 16px;
    font-weight: 500;
    color: var(--text-muted);
    letter-spacing: 0;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Duration Buttons: Outer 10px - 4px padding = Inner 6px radius */
.gg-dur-pills {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 4px;
    background: var(--bg-subtle);
    padding: 4px;
    border-radius: 10px;
    border: 1px solid var(--border);
}

.gg-dur-btn {
    border: none;
    background: transparent;
    color: var(--text-sec);
    border-radius: 6px;
    padding: 6px 4px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
    text-align: center;
    cursor: pointer;
    transition: background-color 150ms var(--ease-out-expo), color 150ms var(--ease-out-expo);
}

.gg-dur-btn:hover {
    color: var(--text-main);
}

.gg-dur-btn.active {
    background: var(--bg-card);
    color: var(--text-main);
    box-shadow: var(--shadow-sm);
}

.gg-perks {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 13px;
    line-height: 20px;
    color: var(--text-sec);
}

.gg-perks li {
    display: flex;
    align-items: center;
    gap: 8px;
}

.gg-perks li svg {
    width: 16px;
    height: 16px;
    color: var(--text-muted);
    flex-shrink: 0;
}

.gg-card-foot {
    padding: 16px 20px 20px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.gg-price-box .old-price {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    line-height: 16px;
    color: var(--text-muted);
    text-decoration: line-through;
    font-variant-numeric: tabular-nums;
    display: block;
}

.gg-price-box .now-price {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 24px;
    line-height: 28px;
    font-weight: 500;
    color: var(--text-main);
    font-variant-numeric: tabular-nums;
}

.gg-price-box .per-unit {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 400;
}

.btn-buy {
    height: 40px;
    background: var(--brand);
    color: #FFFFFF;
    border: none;
    border-radius: 8px;
    padding: 0 16px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
    transition: background-color 150ms var(--ease-out-expo), transform 120ms var(--ease-out-expo);
}

.btn-buy:hover {
    background: var(--brand-hover);
}

.btn-buy:active {
    transform: scale(0.98);
}

/* ==========================================================================
   5. MODALS & ACTIVATION MODE SELECTOR (16PX WINDOW RADIUS)
   ========================================================================== */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 15, 16, 0.72);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 200;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.modal-backdrop.open {
    display: flex;
}

.modal-sheet {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    width: 100%;
    max-width: 520px;
    max-height: 92vh;
    overflow-y: auto;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
    animation: cardReveal 220ms var(--ease-out-expo);
}

.modal-top {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    background: var(--bg-card);
    z-index: 5;
}

.modal-content {
    padding: 20px;
}

.close-circle {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg-subtle);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Activation Mode Tabs */
.mode-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 16px;
}

.mode-tab {
    border: 1px solid var(--border);
    background: var(--bg-subtle);
    border-radius: 10px;
    padding: 12px;
    cursor: pointer;
    text-align: left;
    transition: border-color 150ms var(--ease-out-expo), background-color 150ms var(--ease-out-expo);
    display: flex;
    align-items: center;
    gap: 8px;
}

.mode-tab strong {
    font-size: 13px;
    font-weight: 500;
    display: block;
}

.mode-tab small {
    font-size: 0.68rem;
    color: var(--text-muted);
}

.mode-tab.active {
    border-color: var(--indigo);
    background: var(--indigo-soft);
}

.client-creds-box {
    background: var(--bg-subtle);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 0.95rem;
    margin-bottom: 1rem;
}

.op-selector {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    margin-bottom: 0.95rem;
}

.op-btn {
    border: 2px solid var(--border);
    background: var(--bg-subtle);
    border-radius: 13px;
    padding: 0.65rem 0.4rem;
    text-align: center;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.84rem;
    transition: all 0.18s var(--ease-out-expo);
}

.op-btn small {
    display: block;
    font-size: 0.68rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.op-btn.active {
    border-color: var(--brand);
    background: var(--brand-soft);
}

.pay-box {
    background: var(--bg-subtle);
    border: 1px solid var(--border);
    border-radius: 15px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.input-field {
    width: 100%;
    height: 44px;
    background: var(--bg-card);
    border: 1px solid var(--border-strong);
    border-radius: 10px;
    padding: 0 0.85rem;
    font-size: 0.88rem;
    outline: none;
    transition: border-color 0.2s ease;
}

.input-field:focus {
    border-color: var(--brand);
}

.btn-whatsapp {
    background: var(--whatsapp);
    color: #FFFFFF;
    border: none;
    border-radius: 12px;
    padding: 0.72rem 1rem;
    font-size: 0.86rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    transition: opacity 0.2s;
}

.btn-whatsapp:hover {
    opacity: 0.92;
}

/* Client Space Subscription Ticket */
.sub-ticket {
    background: var(--bg-subtle);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 1.15rem;
    margin-bottom: 0.95rem;
}

.ticket-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 0.6rem 0.85rem;
    border-radius: 10px;
    margin-top: 0.45rem;
    font-size: 0.83rem;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.copy-mini {
    border: 1px solid var(--border);
    background: var(--bg-subtle);
    padding: 0.25rem 0.65rem;
    border-radius: 7px;
    font-size: 0.74rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.18s ease;
}

.copy-mini:hover {
    border-color: var(--brand);
    color: var(--brand);
}

/* ==========================================================================
   6. ESPACE ADMINISTRATEUR — AJOUT, MISE À JOUR & VALIDATIONS (v10.0)
   ========================================================================== */
.icon-btn.admin-space-btn {
    border-color: var(--indigo);
    background: var(--indigo-soft);
    color: var(--indigo);
}

.icon-btn.admin-space-btn:hover {
    background: var(--indigo);
    color: #FFFFFF;
}

.cat-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.85rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.cat-toolbar .cat-strip {
    margin-bottom: 0;
    flex: 1;
}

.quick-add-btn {
    border: 1.5px dashed var(--indigo);
    background: var(--indigo-soft);
    color: var(--indigo);
    padding: 0.58rem 1.05rem;
    border-radius: 99px;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    white-space: nowrap;
    transition: all 0.22s var(--ease-out-expo);
}

.quick-add-btn:hover {
    background: var(--indigo);
    color: #FFFFFF;
    border-style: solid;
    transform: translateY(-1px);
}

.admin-sheet {
    max-width: 840px;
}

.admin-badge-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--indigo-soft);
    color: var(--indigo);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.admin-tabs-bar {
    display: flex;
    gap: 0.4rem;
    padding: 0.65rem 1.35rem;
    background: var(--bg-subtle);
    border-bottom: 1px solid var(--border);
    overflow-x: auto;
    scrollbar-width: none;
}

.admin-tabs-bar::-webkit-scrollbar {
    display: none;
}

.admin-tab-btn {
    border: 1px solid transparent;
    background: transparent;
    color: var(--text-sec);
    padding: 0.52rem 0.95rem;
    border-radius: 11px;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    white-space: nowrap;
    transition: all 0.2s var(--ease-out-expo);
}

.admin-tab-btn:hover {
    color: var(--text-main);
    background: var(--bg-card);
}

.admin-tab-btn.active {
    background: var(--bg-card);
    color: var(--indigo);
    border-color: var(--border);
    box-shadow: var(--shadow-sm);
}

.tab-count {
    background: var(--indigo-soft);
    color: var(--indigo);
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.72rem;
    padding: 0.05rem 0.45rem;
    border-radius: 99px;
}

.admin-panel {
    display: none;
}

.admin-panel.active {
    display: block;
    animation: cardReveal 0.25s var(--ease-out-expo);
}

.admin-form-card {
    background: var(--bg-subtle);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 1.15rem;
}

.adm-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem;
}

.adm-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.65rem;
}

.admin-prod-list {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    margin-top: 0.5rem;
}

.admin-prod-item {
    background: var(--bg-subtle);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 0.75rem 0.95rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
    transition: border-color 0.2s ease;
}

.admin-prod-item:hover {
    border-color: var(--border-strong);
}

.admin-edit-pill {
    border: 1px solid var(--indigo);
    background: var(--indigo-soft);
    color: var(--indigo);
    padding: 0.32rem 0.75rem;
    border-radius: 8px;
    font-size: 0.76rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.admin-edit-pill:hover {
    background: var(--indigo);
    color: #FFFFFF;
}

.admin-del-pill {
    border: 1px solid rgba(255, 71, 87, 0.35);
    background: var(--brand-soft);
    color: var(--brand);
    padding: 0.32rem 0.65rem;
    border-radius: 8px;
    font-size: 0.76rem;
    font-weight: 700;
    cursor: pointer;
}

/* Bouton discret "Modifier" directement sur chaque carte pour mise à jour rapide */
.card-quick-edit {
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #FFFFFF;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.card-quick-edit:hover {
    background: #FFFFFF;
    color: #0F172A;
}

.gg-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 9px;
}

.gg-logo.clickable-logo {
    position: relative;
    cursor: pointer;
    transition: transform 0.2s var(--ease-out-expo);
}

.gg-logo.clickable-logo:hover {
    transform: scale(1.06);
}

/* Éditeur de Logo Modifiable (Galerie + Upload + Aperçu) */
.logo-editor-box {
    background: var(--bg-card);
    border: 1.5px dashed var(--border-strong);
    border-radius: 14px;
    padding: 0.85rem;
}

.logo-editor-row {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
}

.logo-live-preview {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: #FFFFFF;
    border: 2px solid var(--border);
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
    flex-shrink: 0;
    overflow: hidden;
}

.logo-live-preview img,
.logo-live-preview svg {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 10px;
}

.upload-logo-btn {
    height: 44px;
    width: 100%;
    background: var(--indigo-soft);
    border: 1.5px solid var(--indigo);
    color: var(--indigo);
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.upload-logo-btn:hover {
    background: var(--indigo);
    color: #FFFFFF;
}

.logo-picker-strip {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    overflow-x: auto;
    padding: 0.25rem 0;
    scrollbar-width: none;
}

.logo-picker-strip::-webkit-scrollbar {
    display: none;
}

.logo-pick-item {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 2px solid var(--border);
    background: #FFFFFF;
    padding: 2px;
    cursor: pointer;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: all 0.18s ease;
}

.logo-pick-item:hover {
    transform: translateY(-2px);
    border-color: var(--indigo);
}

.logo-pick-item.active {
    border-color: var(--brand);
    box-shadow: 0 0 0 2px var(--brand-soft);
}

/* Toast Notification */
.toast-notice {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 350;
    background: #0F172A;
    color: #FFFFFF;
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 0.78rem 1.15rem;
    border-radius: 14px;
    font-size: 0.85rem;
    font-weight: 700;
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.35);
    display: none;
    align-items: center;
    gap: 0.55rem;
    animation: cardReveal 0.25s var(--ease-out-expo);
}

.toast-notice.show {
    display: inline-flex;
}

/* ==========================================================================
   7. BARRE DE RECHERCHE MOBILE & BARRE DE NAVIGATION BASSE NATIVE (v13.0)
   ========================================================================== */
.mobile-search-row {
    display: none;
    position: relative;
    margin-top: 0.9rem;
}

.mobile-search-row input {
    width: 100%;
    height: 46px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 0 1rem 0 2.65rem;
    font-size: 16px; /* Empêche le zoom automatique sur iOS / Android */
    outline: none;
    box-shadow: var(--shadow-sm);
    transition: border-color 0.2s ease;
}

.mobile-search-row input:focus {
    border-color: var(--brand);
}

.mobile-search-row .search-svg {
    position: absolute;
    left: 0.9rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}

.mobile-bottom-nav {
    display: none;
}

/* ==========================================================================
   8. RESPONSIVE COMPLET : TABLETTE & SMARTPHONE (RESPECT STRICT MOBILE)
   ========================================================================== */
@media (max-width: 980px) {
    .gamsgo-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.1rem;
    }
    .header-search {
        display: none;
    }
    .mobile-search-row {
        display: block;
    }
    .adm-grid-3 {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 680px) {
    html, body {
        overflow-x: hidden;
        max-width: 100vw;
    }

    body {
        padding-bottom: calc(74px + env(safe-area-inset-bottom, 0px));
    }

    .container {
        padding: 0 0.9rem;
    }

    /* En-tête mobile compact et sans débordement */
    .header-row {
        height: 60px;
        gap: 0.4rem;
    }

    .brand-logo {
        gap: 0.5rem !important;
    }

    #siteHeaderLogo {
        width: 36px !important;
        height: 36px !important;
        border-radius: 10px !important;
    }

    .brand-logo div > div {
        font-size: 1.08rem !important;
    }

    .brand-logo div > span {
        font-size: 0.54rem !important;
        letter-spacing: 0.1em !important;
    }

    .header-actions {
        gap: 0.35rem;
    }

    .curr-pill {
        padding: 0.15rem;
    }

    .curr-btn {
        font-size: 0.72rem;
        padding: 0.24rem 0.52rem;
    }

    .icon-btn {
        height: 36px;
        padding: 0 0.65rem;
        font-size: 0.78rem;
    }

    .hide-sm,
    .hide-xs {
        display: none !important;
    }

    /* Bannière Promo Mobile */
    .promo-banner {
        margin: 0.85rem 0 1.1rem;
        padding: 1.15rem 1.05rem;
        border-radius: 18px;
        gap: 1rem;
    }

    .verified-pill {
        font-size: 0.7rem;
        padding: 0.28rem 0.65rem;
        margin-bottom: 0.65rem;
    }

    .promo-left h1 {
        font-size: 1.38rem;
        line-height: 1.18;
        margin-bottom: 0.45rem;
    }

    .promo-left p {
        font-size: 0.84rem;
        line-height: 1.42;
    }

    .promo-right {
        width: 100%;
        min-width: 0;
        padding: 0.9rem;
        border-radius: 14px;
    }

    .operator-chips {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 0.38rem;
    }

    .op-chip {
        justify-content: center;
        padding: 0.38rem 0.3rem;
        font-size: 0.72rem;
    }

    /* Barre de catégories mobile glissante + bouton d'ajout */
    .cat-toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 0.65rem;
        margin-bottom: 1.1rem;
    }

    .cat-strip {
        gap: 0.42rem;
        padding-bottom: 0.2rem;
        -webkit-overflow-scrolling: touch;
    }

    .cat-pill {
        padding: 0.52rem 0.9rem;
        font-size: 0.8rem;
    }

    .quick-add-btn {
        width: 100%;
        justify-content: center;
        padding: 0.62rem 1rem;
        font-size: 0.82rem;
    }

    /* Grille et Cartes Produits Mobile */
    .gamsgo-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        margin-bottom: 1.75rem;
    }

    .gg-card {
        border-radius: 18px;
    }

    .gg-card-head {
        padding: 0.95rem 1rem;
        align-items: flex-start;
    }

    .gg-brand-row {
        gap: 0.65rem;
        min-width: 0;
        flex: 1;
    }

    .gg-logo {
        width: 44px;
        height: 44px;
        border-radius: 11px;
    }

    .gg-title {
        min-width: 0;
    }

    .gg-title h3 {
        font-size: 0.98rem;
        line-height: 1.22;
        word-break: break-word;
    }

    .gg-title span {
        font-size: 0.72rem;
    }

    .gg-card-body {
        padding: 0.95rem 1rem;
        gap: 0.8rem;
    }

    /* Contrôles 1M / 2M / 3M / 6M / 12M tactiles sur mobile */
    .gg-dur-pills {
        gap: 0.25rem;
        padding: 0.22rem;
    }

    .gg-dur-btn {
        padding: 0.48rem 0.1rem;
        font-size: 0.72rem;
        white-space: nowrap;
        min-height: 36px;
    }

    .gg-perks {
        font-size: 0.8rem;
        gap: 0.32rem;
    }

    .gg-card-foot {
        padding: 0.85rem 1rem 1rem;
    }

    .gg-price-box .now-price {
        font-size: 1.22rem;
    }

    .btn-buy {
        padding: 0.65rem 1.1rem;
        min-height: 42px;
        font-size: 0.84rem;
    }

    /* Fenêtres Modales (Bottom-Sheet Mobile Natif) */
    .modal-backdrop {
        align-items: flex-end;
        padding: 0;
    }

    .modal-sheet {
        max-width: 100%;
        width: 100%;
        max-height: 90dvh;
        border-radius: 22px 22px 0 0;
        padding-bottom: env(safe-area-inset-bottom, 0px);
    }

    .modal-top {
        padding: 0.95rem 1rem;
    }

    .modal-content {
        padding: 1rem;
    }

    /* Police 16px sur les champs de saisie mobile pour éviter le zoom auto iOS/Android */
    .input-field,
    select.input-field,
    textarea.input-field {
        font-size: 16px;
        height: 44px;
    }

    .mode-tabs,
    .adm-grid-2,
    .adm-grid-3,
    .client-creds-box > div:last-child {
        grid-template-columns: 1fr !important;
    }

    .op-selector {
        gap: 0.38rem;
    }

    .op-btn {
        padding: 0.55rem 0.25rem;
        font-size: 0.76rem;
    }

    .logo-editor-row {
        flex-direction: column;
        align-items: stretch;
    }

    .logo-live-preview {
        margin: 0 auto;
    }

    .admin-tabs-bar {
        padding: 0.55rem 0.9rem;
    }

    .admin-tab-btn {
        padding: 0.48rem 0.78rem;
        font-size: 0.78rem;
    }

    .admin-prod-item {
        flex-direction: column;
        align-items: stretch;
    }

    .admin-prod-item > div:last-child {
        width: 100%;
        justify-content: flex-end;
    }

    /* Toast au-dessus de la barre de navigation mobile */
    .toast-notice {
        left: 12px;
        right: 12px;
        bottom: calc(76px + env(safe-area-inset-bottom, 0px));
        justify-content: center;
        font-size: 0.8rem;
    }

    /* Barre de Navigation Mobile Fixe en Bas */
    .mobile-bottom-nav {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 160;
        background: var(--bg-header);
        backdrop-filter: blur(18px);
        -webkit-backdrop-filter: blur(18px);
        border-top: 1px solid var(--border);
        padding: 0.35rem 0.4rem calc(0.35rem + env(safe-area-inset-bottom, 0px));
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
    }

    .m-nav-item {
        border: none;
        background: transparent;
        color: var(--text-muted);
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 0.18rem;
        padding: 0.32rem 0.2rem;
        border-radius: 10px;
        font-size: 0.68rem;
        font-weight: 700;
        cursor: pointer;
        transition: color 0.18s ease, transform 0.18s ease;
    }

    .m-nav-item:active {
        transform: scale(0.94);
    }

    .m-nav-item.active,
    .m-nav-item:hover {
        color: var(--brand);
    }
}

/* ==========================================================================
   9. PROTECTION DU LIEN SPÉCIAL ADMIN & ASSISTANT CHATBOT GEMINI IA (v14.0)
   ========================================================================== */
body:not(.is-admin) .admin-only {
    display: none !important;
}

body.is-admin #headerAdminLockBtn {
    display: none !important;
}

.adm-months-check-row {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.45rem;
}

.adm-month-pill {
    border: 1.5px solid var(--border-strong);
    background: var(--bg-card);
    color: var(--text-muted);
    border-radius: 10px;
    padding: 0.55rem 0.35rem;
    font-size: 0.76rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.18s ease;
    text-align: center;
}

.adm-month-pill.active {
    border-color: var(--emerald);
    background: var(--emerald-soft);
    color: var(--emerald);
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.15);
}

.adm-quick-month-chip {
    border: 1px solid var(--border-strong);
    background: var(--bg-card);
    color: var(--text-muted);
    border-radius: 6px;
    padding: 0.16rem 0.42rem;
    font-size: 0.68rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
}

.adm-quick-month-chip.active {
    border-color: var(--emerald);
    background: var(--emerald-soft);
    color: var(--emerald);
}

@media (max-width: 680px) {
    .adm-months-check-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

.ai-chat-fab {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 185;
    background: #171717;
    color: #EDEDED;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    height: 44px;
    padding: 0 16px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
    transition: background-color 150ms var(--ease-out-expo), transform 120ms var(--ease-out-expo);
}

.ai-chat-fab:hover {
    background: #232325;
}

.ai-chat-fab:active {
    transform: scale(0.98);
}

.ai-chat-window {
    position: fixed;
    right: 24px;
    bottom: 80px;
    z-index: 195;
    width: 376px;
    max-width: calc(100vw - 24px);
    height: 496px;
    max-height: calc(100dvh - 120px);
    background: var(--bg-card);
    border: 1px solid var(--border-strong);
    border-radius: 16px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
    display: none;
    flex-direction: column;
    overflow: hidden;
    animation: cardReveal 220ms var(--ease-out-expo);
}

.ai-chat-window.open {
    display: flex;
}

.ai-chat-head {
    background: #141415;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    color: #EDEDED;
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ai-avatar-circle {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: #232325;
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ai-chat-messages {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: var(--bg-page);
}

.ai-msg {
    max-width: 86%;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 13px;
    line-height: 20px;
    word-wrap: break-word;
}

.ai-msg.bot {
    align-self: flex-start;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-main);
    box-shadow: var(--shadow-sm);
}

.ai-msg.user {
    align-self: flex-end;
    background: var(--text-main);
    color: var(--bg-page);
}

.ai-quick-chips {
    display: flex;
    gap: 6px;
    padding: 8px 12px;
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    overflow-x: auto;
    scrollbar-width: none;
}

.ai-quick-chips::-webkit-scrollbar {
    display: none;
}

.ai-chip {
    border: 1px solid var(--border);
    background: var(--bg-subtle);
    color: var(--text-sec);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    cursor: pointer;
    transition: border-color 150ms var(--ease-out-expo), color 150ms var(--ease-out-expo);
}

.ai-chip:hover {
    border-color: var(--border-strong);
    color: var(--text-main);
}

.ai-chat-input-row {
    display: flex;
    gap: 8px;
    padding: 12px;
    background: var(--bg-card);
    border-top: 1px solid var(--border);
}

.ai-chat-input-row input {
    flex: 1;
    height: 40px;
    background: var(--bg-subtle);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0 12px;
    font-size: 16px;
    outline: none;
}

.ai-chat-input-row input:focus {
    border-color: var(--border-strong);
    background: var(--bg-card);
}

.ai-send-btn {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    border: none;
    background: var(--brand);
    color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
}

@media (max-width: 680px) {
    .ai-chat-fab {
        right: 14px;
        bottom: calc(74px + env(safe-area-inset-bottom, 0px));
        height: 46px;
        padding: 0 0.95rem;
        font-size: 0.8rem;
    }

    .ai-chat-window {
        right: 12px;
        left: 12px;
        width: auto;
        bottom: calc(128px + env(safe-area-inset-bottom, 0px));
        height: 66dvh;
    }
}

@media (max-width: 375px) {
    .operator-chips {
        grid-template-columns: 1fr;
    }
    .gg-dur-btn {
        font-size: 0.66rem;
    }
}

/* ==========================================================================
   10. v20.0 — IDENTITÉ, HERO À DEUX COLONNES, FLUX DE COMMANDES EN DIRECT
   Direction : un guichet mobile money — reçus, références en chiffres mono,
   point vert « en direct » comme seul détail de signature.
   ========================================================================== */

/* --- Marque dans l'en-tête --- */
.brand-logo { gap: 12px; }

.brand-mark {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.brand-name {
    font-size: 18px;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.brand-sub {
    font-family: 'DM Sans', sans-serif;
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 0;
    color: var(--text-muted);
    margin-top: 2px;
}

/* --- Point « en direct » (signature) --- */
.live-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #4CC38A;
    flex-shrink: 0;
    display: inline-block;
}

/* --- Bandeau défilant des achats --- */
.live-ticker {
    display: flex;
    align-items: stretch;
    height: 40px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    overflow: hidden;
}

.live-ticker-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 16px 0 24px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-main);
    border-right: 1px solid var(--border);
    background: var(--bg-card);
    flex-shrink: 0;
    position: relative;
    z-index: 2;
}

.live-ticker-viewport {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 32px, #000 calc(100% - 48px), transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0, #000 32px, #000 calc(100% - 48px), transparent 100%);
}

.live-ticker-track {
    list-style: none;
    display: flex;
    align-items: center;
    white-space: nowrap;
    will-change: transform;
    padding-left: 24px;
}

.tk-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding-right: 24px;
    font-size: 13px;
    color: var(--text-sec);
    flex-shrink: 0;
}

.tk-item::after {
    content: "";
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--text-muted);
    opacity: 0.5;
    margin-left: 16px;
}

.tk-item strong {
    color: var(--text-main);
    font-weight: 500;
}

.tk-logo {
    width: 20px;
    height: 20px;
    border-radius: 5px;
    overflow: hidden;
    display: inline-flex;
    flex-shrink: 0;
}

.tk-logo svg,
.tk-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tk-meta {
    font-size: 12px;
    color: var(--text-muted);
}

@media (prefers-reduced-motion: reduce) {
    .live-ticker-viewport {
        overflow-x: auto;
        scrollbar-width: none;
    }
}

/* --- Hero à deux colonnes --- */
.promo-banner {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    align-items: center;
    gap: 40px;
    padding: 40px;
    margin: 24px 0 0;
}

.promo-left { max-width: 600px; }

.promo-left h1 {
    font-size: clamp(30px, 3.4vw, 42px);
    line-height: 1.1;
    margin-bottom: 16px;
}

.hero-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 28px;
}

.hero-btn-primary,
.hero-btn-secondary {
    height: 44px;
    padding: 0 18px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: background-color 150ms var(--ease-out-expo), border-color 150ms var(--ease-out-expo), transform 120ms var(--ease-out-expo);
}

.hero-btn-primary {
    background: #EDEDED;
    color: #141415;
    border: 1px solid #EDEDED;
}

.hero-btn-primary:hover { background: #FFFFFF; }

.hero-btn-secondary {
    background: transparent;
    color: #EDEDED;
    border: 1px solid rgba(255, 255, 255, 0.14);
}

.hero-btn-secondary:hover {
    background: #19191B;
    border-color: rgba(255, 255, 255, 0.24);
}

.hero-btn-primary:active,
.hero-btn-secondary:active { transform: scale(0.98); }

.hero-btn-primary:focus-visible,
.hero-btn-secondary:focus-visible,
.btn-buy:focus-visible,
.cat-pill:focus-visible,
.icon-btn:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
}

.promo-pay {
    margin-top: 32px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.promo-pay-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    font-size: 12px;
    color: #A1A1A6;
}

.promo-pay-head .mono { color: #EDEDED; }

.promo-pay-foot {
    font-size: 12px;
    color: #85858B;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* --- Panneau « Commandes récentes » --- */
.orders-panel {
    background: #19191B;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    overflow: hidden;
    align-self: stretch;
    display: flex;
    flex-direction: column;
}

.orders-panel-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.orders-panel-head strong {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #EDEDED;
}

.orders-panel-head span {
    font-size: 12px;
    color: #85858B;
}

.orders-live {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 8px;
    border-radius: 6px;
    background: #232325;
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #A1A1A6 !important;
}

.orders-list {
    list-style: none;
    flex: 1;
    min-height: 320px;
}

.order-row {
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    height: 64px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.order-row:last-child { border-bottom: none; }

.order-row.is-new { animation: orderIn 280ms var(--ease-out-expo) both; }

@keyframes orderIn {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
    .order-row.is-new { animation: none; }
}

.order-logo {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    overflow: hidden;
    background: #232325;
    display: flex;
}

.order-logo svg,
.order-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.order-main {
    display: flex;
    flex-direction: column;
    min-width: 0;
    gap: 2px;
}

.order-who,
.order-what {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.order-who {
    font-size: 13px;
    color: #A1A1A6;
}

.order-who strong {
    color: #EDEDED;
    font-weight: 500;
}

.order-what {
    font-size: 12px;
    color: #85858B;
}

.order-side {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}

.order-amount {
    font-size: 13px;
    color: #EDEDED;
}

.order-meta {
    font-size: 11px;
    color: #85858B;
    white-space: nowrap;
}

body.live-off .live-ticker,
body.live-off .orders-panel,
body.live-off .purchase-pop { display: none !important; }

body.live-off .promo-banner { grid-template-columns: 1fr; }

/* --- Titre du catalogue --- */
.catalog-head {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin: 48px 0 16px;
    scroll-margin-top: 80px;
}

.catalog-head h2 {
    font-size: 24px;
    font-weight: 500;
}

.catalog-count {
    font-size: 12px;
    color: var(--text-muted);
}

/* --- Licence à vie (correctif : icône à 16px) --- */
.lic-box {
    background: var(--bg-subtle);
    border: 1px solid var(--border);
    padding: 8px 12px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
    color: var(--emerald);
    display: flex;
    align-items: center;
    gap: 8px;
}

.lic-box svg,
.toast-notice svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* --- Comment ça marche --- */
.steps-section { margin: 16px 0 72px; }

.steps-head { margin-bottom: 20px; }

.steps-head h2 {
    font-size: 24px;
    font-weight: 500;
    margin-bottom: 4px;
}

.steps-head p {
    font-size: 14px;
    color: var(--text-muted);
}

.steps-grid {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.step-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 24px;
}

.step-num {
    font-size: 12px;
    color: var(--text-muted);
}

.step-card h3 {
    font-size: 16px;
    font-weight: 500;
    margin: 12px 0 8px;
}

.step-card p {
    font-size: 14px;
    line-height: 22px;
    color: var(--text-sec);
}

/* --- Pied de page --- */
.site-footer {
    background: #141415;
    color: #A1A1A6;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 48px;
    font-size: 14px;
}

.footer-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr));
    gap: 32px;
}

.footer-brand-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.footer-brand-row img {
    border-radius: 8px;
    object-fit: cover;
}

.footer-brand-row strong {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: #EDEDED;
}

.site-footer .dot-mg { color: var(--brand); }

.footer-brand p {
    max-width: 36ch;
    line-height: 22px;
}

.footer-col {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-col h4 {
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0;
    color: #EDEDED;
    margin-bottom: 4px;
}

.footer-col a {
    color: #A1A1A6;
    transition: color 150ms var(--ease-out-expo);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.footer-col a:hover { color: #EDEDED; }

.footer-admin-link { color: #85858B !important; }

.footer-bottom {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 40px;
    padding-top: 20px;
    padding-bottom: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 12px;
    color: #85858B;
}

/* --- Notification d'achat --- */
.purchase-pop {
    position: fixed;
    left: 24px;
    bottom: 24px;
    z-index: 180;
    width: 360px;
    max-width: calc(100vw - 48px);
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr) 24px;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border-strong);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    opacity: 0;
    transform: translateY(8px);
    pointer-events: none;
    transition: opacity 200ms var(--ease-out-expo), transform 200ms var(--ease-out-expo);
}

.purchase-pop.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.purchase-pop-logo {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    overflow: hidden;
    background: var(--bg-subtle);
    display: flex;
}

.purchase-pop-logo svg,
.purchase-pop-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.purchase-pop-body p {
    font-size: 13px;
    line-height: 18px;
    color: var(--text-sec);
}

.purchase-pop-body strong {
    color: var(--text-main);
    font-weight: 500;
}

.purchase-pop-body span {
    display: block;
    margin-top: 4px;
    font-size: 11px;
    color: var(--text-muted);
}

.purchase-pop-close {
    width: 24px;
    height: 24px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    align-self: start;
    transition: background-color 150ms var(--ease-out-expo), color 150ms var(--ease-out-expo);
}

.purchase-pop-close:hover {
    background: var(--bg-subtle);
    color: var(--text-main);
}

[data-theme="dark"] .purchase-pop { box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4); }

/* --- Responsive v20 --- */
@media (max-width: 980px) {
    .promo-banner {
        grid-template-columns: 1fr;
        gap: 28px;
    }
    .promo-left { max-width: none; }
    .footer-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 680px) {
    .brand-logo { gap: 8px !important; }
    .brand-mark {
        width: 36px;
        height: 36px;
    }
    .brand-name { font-size: 16px; }
    .brand-sub { font-size: 11px; }

    .live-ticker { height: 36px; }
    .live-ticker-label { padding: 0 12px 0 14px; }
    .tk-item { font-size: 12px; }

    .promo-banner {
        padding: 20px 16px;
        border-radius: 16px;
        margin-top: 12px;
    }
    .promo-left h1 { font-size: 26px; }
    .hero-actions { margin-top: 20px; }
    .hero-btn-primary,
    .hero-btn-secondary {
        flex: 1;
        justify-content: center;
        padding: 0 12px;
    }
    .promo-pay { margin-top: 24px; }

    .orders-panel-head { padding: 12px 16px; }
    .orders-list { min-height: 0; }
    .order-row {
        padding: 10px 16px;
        height: 60px;
    }
    .order-row:nth-child(n + 4) { display: none; }

    .catalog-head { margin-top: 32px; }
    .catalog-head h2,
    .steps-head h2 { font-size: 20px; }

    .steps-grid { grid-template-columns: 1fr; gap: 12px; }
    .step-card { padding: 20px; }
    .steps-section { margin-bottom: 48px; }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 28px 16px;
    }
    .footer-bottom { margin-top: 32px; }

    .purchase-pop {
        left: 12px;
        right: 12px;
        top: 68px;
        bottom: auto;
        width: auto;
        max-width: none;
        transform: translateY(-8px);
    }
}

/* En-tête mobile : le login admin reste accessible depuis le pied de page */
@media (max-width: 480px) {
    #headerAdminLockBtn { display: none !important; }
    .brand-sub { display: none; }
    .header-actions { gap: 4px; }
}

/* ==========================================================================
   11. v22.0 — LOGOS EN ICÔNES D'APPLICATION & ANIMATIONS FLUIDES
   Une seule courbe (--ease-enter), transform et opacity uniquement.
   Les états cachés n'existent que sous html.js-motion (ajoutée en JS).
   ========================================================================== */

/* Les logos sont des icônes complètes : on retire le cadre intérieur */
.gg-logo {
    padding: 0;
    border-radius: 11px;
    background: transparent;
}

.gg-logo svg,
.gg-logo img {
    display: block;
    width: 100%;
    height: 100%;
}

.logo-pick-item {
    padding: 0;
    border-width: 1px;
}

.logo-pick-item svg {
    width: 100%;
    height: 100%;
    display: block;
}

#mLogo svg {
    width: 100%;
    height: 100%;
    display: block;
}

.top-header {
    transition: background-color 180ms var(--ease-out-expo), border-color 180ms var(--ease-out-expo), box-shadow 240ms var(--ease-out-expo);
}

.top-header.scrolled {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
}

[data-theme="dark"] .top-header.scrolled {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}

@media (prefers-reduced-motion: no-preference) {
    :root {
        --ease-enter: cubic-bezier(0.22, 1, 0.36, 1);
    }

    @keyframes riseIn {
        from { opacity: 0; transform: translateY(14px); }
        to { opacity: 1; transform: none; }
    }

    @keyframes wordIn {
        from { transform: translateY(110%); }
        to { transform: none; }
    }

    @keyframes fadeIn {
        from { opacity: 0; }
        to { opacity: 1; }
    }

    @keyframes forceShow {
        to { opacity: 1; transform: none; }
    }

    @keyframes sheetIn {
        from { opacity: 0; transform: translateY(12px) scale(0.985); }
        to { opacity: 1; transform: none; }
    }

    @keyframes sheetUp {
        from { opacity: 0.4; transform: translateY(48px); }
        to { opacity: 1; transform: none; }
    }

    /* --- 1. Entrée du hero --- */
    .js-motion .live-ticker { animation: fadeIn 600ms ease 200ms both; }
    .js-motion .verified-pill { animation: riseIn 500ms var(--ease-enter) 80ms both; }

    .js-motion .promo-left h1 {
        opacity: 0;
        animation: forceShow 0s linear 1.6s forwards; /* filet de sécurité */
    }

    .js-motion.hero-ready .promo-left h1 { opacity: 1; }

    .js-motion .promo-left h1 .w {
        display: inline-block;
        overflow: hidden;
        vertical-align: top;
        padding-bottom: 0.24em;
        margin-bottom: -0.24em;
    }

    .js-motion .promo-left h1 .w > span {
        display: inline-block;
        animation: wordIn 720ms var(--ease-enter) both;
        animation-delay: calc(60ms + var(--wi, 0) * 40ms);
    }

    .js-motion .promo-left > p { animation: riseIn 560ms var(--ease-enter) 340ms both; }
    .js-motion .hero-actions { animation: riseIn 560ms var(--ease-enter) 420ms both; }
    .js-motion .promo-pay { animation: riseIn 560ms var(--ease-enter) 500ms both; }
    .js-motion .orders-panel { animation: riseIn 640ms var(--ease-enter) 220ms both; }

    /* --- 2. Apparition au défilement --- */
    .js-motion .gg-card { animation: none; }

    .js-motion [data-reveal]:not(.in) {
        opacity: 0;
        transform: translateY(18px);
    }

    .js-motion [data-reveal].in:not(.settled) {
        transition: opacity 600ms var(--ease-enter), transform 600ms var(--ease-enter);
        transition-delay: var(--rd, 0ms);
    }

    /* --- 5. Fenêtres --- */
    .modal-backdrop.open { animation: fadeIn 200ms ease both; }
    .modal-sheet { animation: sheetIn 300ms var(--ease-enter) both; }

    .toast-notice.show { animation: riseIn 260ms var(--ease-enter) both; }
}

@media (prefers-reduced-motion: no-preference) and (max-width: 680px) {
    .modal-sheet { animation-name: sheetUp; }
}

/* --- Survols : souris uniquement --- */
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
    .gg-card {
        transition: transform 240ms var(--ease-out-expo), box-shadow 240ms var(--ease-out-expo), border-color 150ms var(--ease-out-expo);
    }

    .gg-card:hover { transform: translateY(-3px); }

    .gg-card .gg-logo { transition: transform 240ms var(--ease-out-expo); }
    .gg-card:hover .gg-logo { transform: scale(1.04); }

    .btn-buy svg,
    .hero-btn-primary svg,
    .hero-btn-secondary svg {
        transition: transform 200ms var(--ease-out-expo);
    }

    .btn-buy:hover svg { transform: translateX(3px); }
    .hero-btn-primary:hover svg { transform: translateY(2px); }
    .hero-btn-secondary:hover svg { transform: scale(1.08); }

    .step-card {
        transition: transform 240ms var(--ease-out-expo), border-color 150ms var(--ease-out-expo);
    }

    .step-card:hover {
        transform: translateY(-2px);
        border-color: var(--border-strong);
    }

    .order-row { transition: background-color 150ms var(--ease-out-expo); }
    .order-row:hover { background: rgba(255, 255, 255, 0.025); }
}

/* Titre découpé : seul le mot mis en avant (Ariary) garde son soulignement */
.promo-left h1 .w,
.promo-left h1 .w > span {
    text-decoration: none;
}

@media (max-width: 420px) {
    .hero-actions { flex-direction: column; }
    .hero-btn-primary,
    .hero-btn-secondary { width: 100%; flex: none; }
}

/* ==========================================================================
   12. v24.0 — ESPACE CLIENT BIEN VISIBLE DANS LE COIN, SUR MOBILE COMME SUR PC
   ========================================================================== */
.icon-btn.client-space-btn {
    height: 40px;
    padding: 0 14px;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 10px;
}

.curr-pill-mobile { display: none; }

@media (max-width: 680px) {
    .curr-pill-header { display: none; }

    .mobile-search-row {
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .mobile-search-row input {
        flex: 1;
        min-width: 0;
    }

    .curr-pill-mobile {
        display: inline-flex;
        flex-shrink: 0;
        height: 46px;
        align-items: center;
        border-radius: 12px;
    }

    .curr-pill-mobile .curr-btn {
        height: 36px;
        padding: 0 10px;
        font-size: 12px;
    }

    .header-actions { gap: 6px; }

    .icon-btn.client-space-btn {
        height: 38px;
        padding: 0 12px;
        gap: 6px;
        font-size: 13px;
    }
}

@media (max-width: 380px) {
    .icon-btn.client-space-btn .badge-pill { display: none; }
    .icon-btn.client-space-btn { padding: 0 10px; }
}

/* ==========================================================================
   13. v25.0 — ÉCRAN DE CHARGEMENT & BOUTON RETOUR EN HAUT
   ========================================================================== */

/* L'entrée du hero attend la fin de l'écran de chargement */
html.is-loading body > *:not(.app-loader),
html.is-loading body > *:not(.app-loader) * {
    animation-play-state: paused !important;
}

.back-to-top {
    position: fixed;
    right: 24px;
    bottom: 80px;
    z-index: 184;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: var(--bg-card);
    color: var(--text-main);
    box-shadow: 0 0 0 1px var(--border-strong), 0 8px 24px rgba(0, 0, 0, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transform: translateY(8px) scale(0.96);
    pointer-events: none;
    transition: opacity 220ms var(--ease-out-expo), transform 220ms var(--ease-out-expo), background-color 150ms var(--ease-out-expo);
}

.back-to-top.show {
    opacity: 1;
    transform: none;
    pointer-events: auto;
}

.back-to-top:hover { background: var(--bg-subtle); }
.back-to-top:active { transform: scale(0.94); }

.back-to-top:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
}

[data-theme="dark"] .back-to-top {
    box-shadow: 0 0 0 1px var(--border-strong), 0 8px 24px rgba(0, 0, 0, 0.4);
}

.btt-ring {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
    pointer-events: none;
}

.btt-ring circle {
    fill: none;
    stroke: var(--brand);
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
    opacity: 0;
}

/* Anneau de progression de lecture, en CSS pur là où le navigateur le permet */
@supports (animation-timeline: scroll()) {
    @media (prefers-reduced-motion: no-preference) {
        .btt-ring circle {
            opacity: 1;
            animation: bttProgress linear both;
            animation-timeline: scroll(root);
        }

        @keyframes bttProgress {
            from { stroke-dashoffset: 100; }
            to { stroke-dashoffset: 0; }
        }
    }
}

/* Masqué quand le chat est ouvert */
.ai-chat-window.open ~ .back-to-top {
    opacity: 0;
    pointer-events: none;
}

@media (max-width: 680px) {
    .back-to-top {
        right: 14px;
        bottom: calc(132px + env(safe-area-inset-bottom, 0px));
        width: 42px;
        height: 42px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .back-to-top { transition: opacity 1ms; }
}

/* En-tête collé en haut sur mobile : « clip » coupe le débordement horizontal
   sans créer de zone de défilement (« hidden » empêchait position: sticky) */
@media (max-width: 680px) {
    html, body { overflow-x: clip; }
}

/* ==========================================================================
   14. v27.0 — BANNIÈRE COOKIES & FENÊTRE DE RÉGLAGES
   ========================================================================== */
.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;
}

.cookie-banner {
    position: fixed;
    left: 24px;
    bottom: 24px;
    z-index: 190;
    width: 420px;
    max-width: calc(100vw - 48px);
    background: var(--bg-card);
    border: 1px solid var(--border-strong);
    border-radius: 14px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.14);
    padding: 20px;
    opacity: 0;
    transform: translateY(12px);
    pointer-events: none;
    visibility: hidden;
    transition: opacity 260ms var(--ease-out-expo), transform 260ms var(--ease-out-expo), visibility 0s linear 260ms;
}

.cookie-banner.show {
    opacity: 1;
    transform: none;
    pointer-events: auto;
    visibility: visible;
    transition-delay: 0s;
}

[data-theme="dark"] .cookie-banner { box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45); }

.cookie-banner-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-main);
    margin-bottom: 6px;
}

.cookie-banner-text {
    font-size: 13px;
    line-height: 20px;
    color: var(--text-sec);
}

.cookie-banner-text a,
.cookie-policy-link {
    color: var(--text-main);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.cookie-banner-actions {
    display: flex;
    gap: 8px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.cookie-btn {
    height: 38px;
    padding: 0 14px;
    border-radius: 8px;
    border: 1px solid var(--border-strong);
    background: var(--bg-card);
    color: var(--text-main);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 150ms var(--ease-out-expo), border-color 150ms var(--ease-out-expo);
}

.cookie-btn:hover { background: var(--bg-subtle); }

.cookie-btn-primary {
    background: var(--text-main);
    color: var(--bg-page);
    border-color: var(--text-main);
}

.cookie-btn-primary:hover { background: var(--text-main); opacity: 0.92; }

.cookie-btn-link {
    border-color: transparent;
    background: transparent;
    text-decoration: underline;
    text-underline-offset: 3px;
    padding: 0 6px;
}

.cookie-btn-link:hover { background: transparent; color: var(--text-sec); }

.cookie-btn:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
}

/* Pendant que la bannière est visible, la notification d'achat attend */
body.consent-open .purchase-pop { display: none; }

.cookie-sheet { max-width: 480px; }

.cookie-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cookie-cat {
    background: var(--bg-subtle);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px 16px;
}

.cookie-cat-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 6px;
}

.cookie-cat-head strong {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-main);
}

.cookie-cat p {
    font-size: 13px;
    line-height: 20px;
    color: var(--text-sec);
}

.cookie-always {
    font-size: 12px;
    color: var(--text-muted);
}

.cookie-switch {
    position: relative;
    display: inline-flex;
    cursor: pointer;
}

.cookie-switch input {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    cursor: pointer;
}

.cookie-switch-track {
    width: 40px;
    height: 24px;
    border-radius: 12px;
    background: var(--border-strong);
    position: relative;
    transition: background-color 180ms var(--ease-out-expo);
}

.cookie-switch-track::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #FFFFFF;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    transition: transform 180ms var(--ease-out-expo);
}

.cookie-switch input:checked + .cookie-switch-track { background: var(--emerald); }
.cookie-switch input:checked + .cookie-switch-track::after { transform: translateX(16px); }
.cookie-switch input:focus-visible + .cookie-switch-track { outline: 2px solid var(--brand); outline-offset: 2px; }

.cookie-panel-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    margin-top: 4px;
    flex-wrap: wrap;
}

.cookie-policy-link {
    font-size: 12px;
    color: var(--text-muted);
    align-self: flex-start;
}

@media (max-width: 680px) {
    .cookie-banner {
        left: 12px;
        right: 12px;
        width: auto;
        max-width: none;
        bottom: calc(76px + env(safe-area-inset-bottom, 0px));
        padding: 16px;
    }

    .cookie-banner-actions .cookie-btn:not(.cookie-btn-link) { flex: 1; }

    body.consent-open .ai-chat-fab,
    body.consent-open .back-to-top { visibility: hidden; }

    .cookie-panel-actions .cookie-btn { flex: 1; }
}

@media (prefers-reduced-motion: reduce) {
    .cookie-banner,
    .cookie-switch-track,
    .cookie-switch-track::after { transition: none; }
}

.cookie-btn { white-space: nowrap; }

@media (max-width: 680px) {
    .cookie-banner-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    .cookie-btn-link {
        grid-column: 1 / -1;
        justify-self: center;
        height: 32px;
    }
}
