/* ========================================================
   CAREXPLORER - LISTING PAGE CSS
   Design Chat Moderne (Style ChatGPT)
   Police plus grande, lisible, fond sombre épuré
======================================================== */

/* ========== VARIABLES ========== */
:root {
    /* Couleurs principales - Violet foncé (style homepage) */
    --bg-main: #0a0a12;
    --bg-chat: #0e0e18;
    --bg-user-msg: rgba(30, 25, 50, 0.9);
    --bg-card: rgba(22, 18, 40, 0.95);

    /* Accent — Apple clean white */
    --accent: #ffffff;
    --accent-hover: rgba(255, 255, 255, 0.85);
    --accent-glow: rgba(255, 255, 255, 0.12);
    --accent-light: rgba(255, 255, 255, 0.08);

    /* Textes */
    --text-main: #f0f0f5;
    --text-secondary: #a0a0b5;
    --text-muted: #6a6a80;

    /* Bordures */
    --border-light: rgba(120, 100, 180, 0.2);
    --border-hover: rgba(180, 150, 220, 0.3);

    /* Radius */
    --radius-xl: 24px;
    --radius-l: 20px;
    --radius-m: 16px;
    --radius-s: 12px;
    --radius-full: 50px;

    /* Fonts - Inter (style ChatGPT) */
    --font-chat: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-heading: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* ========== RESET ========== */
*, *::before, *::after {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
}

body.listing-page {
    background: var(--bg-main);
    color: var(--text-main);
    font-family: var(--font-chat);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
    font-size: 16px;
    letter-spacing: -0.01em;
}

/* ========== ANIMATIONS ========== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

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

@keyframes ce-typing {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-5px); }
}

@keyframes ce-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

@keyframes pulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

/* ========== PAGE CONTENT ========== */
.listing-page .ce-page-content {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: #12101c;
}

/* ========== VERSION BADGE ========== */
.ce-version-badge {
    position: fixed;
    top: 14px;
    left: calc(var(--sidebar-width, 260px) + 10px);
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.25s ease, left 0.25s ease;
    z-index: 100;
}

body.menu-closed .ce-version-badge {
    left: calc(var(--sidebar-width-closed, 50px) + 10px);
}

.ce-version-badge:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.1);
}

.ce-version-text {
    font-family: var(--font-chat);
    font-size: 15px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
}

.ce-version-label {
    color: #ffffff;
}

.ce-version-tag {
    color: var(--text-muted);
}

.ce-version-badge:hover .ce-version-label {
    color: #ffffff;
}

.ce-version-badge:hover .ce-version-tag {
    color: var(--text-secondary);
}

.ce-version-chevron {
    color: var(--text-muted);
    transition: color 0.2s ease, transform 0.2s ease;
}

.ce-version-badge:hover .ce-version-chevron {
    color: var(--text-secondary);
}

/* ========== MOBILE HEADER (ChatGPT Style) ========== */
.ce-mobile-header {
    display: none;
}

@media (max-width: 768px) {
    /* ========== MOBILE HEADER - Match .ce-page-content background ========== */
    .ce-mobile-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        height: 48px;
        padding: 0 16px;
        background: #12101c;
        border-bottom: none;
        z-index: 1000;
    }

    .ce-mobile-header-left {
        display: flex;
        align-items: center;
        gap: 12px;
    }

    .ce-mobile-menu-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 32px;
        height: 32px;
        border-radius: 8px;
        background: transparent;
        border: none;
        color: rgba(255, 255, 255, 0.6);
        cursor: pointer;
        transition: all 0.2s ease;
        -webkit-tap-highlight-color: transparent;
    }

    .ce-mobile-menu-btn:active {
        background: rgba(255, 255, 255, 0.06);
        transform: scale(0.95);
    }

    .ce-mobile-logo {
        font-family: var(--font-heading);
        font-size: 16px;
        font-weight: 600;
        color: #ffffff;
        letter-spacing: -0.02em;
    }

    .ce-mobile-logo img {
        height: 17px;
        width: auto;
    }

    .ce-mobile-header-right {
        display: flex;
        align-items: center;
        gap: 4px;
    }

    .ce-mobile-account-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 32px;
        height: 32px;
        border-radius: 8px;
        color: rgba(255, 255, 255, 0.5);
        -webkit-tap-highlight-color: transparent;
    }

    .ce-mobile-new-chat-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 38px;
        height: 38px;
        border-radius: 10px;
        background: transparent;
        border: none;
        color: rgba(255, 255, 255, 0.8);
        cursor: pointer;
        transition: all 0.2s ease;
        -webkit-tap-highlight-color: transparent;
    }

    .ce-mobile-new-chat-btn:active {
        background: rgba(255, 255, 255, 0.08);
        transform: scale(0.95);
    }

    /* Version badge et options: caches sur mobile */
    .ce-version-badge {
        display: none !important;
    }

    .ce-market-selector {
        top: 10px;
        right: 10px;
    }

    .ce-market-selector-btn {
        padding: 6px 10px;
        gap: 6px;
    }

    .ce-market-label {
        display: none;
    }

    .ce-market-flag {
        font-size: 18px;
    }

    /* ========== LAYOUT MOBILE CHATGPT-STYLE ========== */

    /* Lock html+body to prevent iOS Safari from capturing touch events
       for body scroll (rubber-banding) instead of routing to .ce-chat-wrapper */
    html.listing-page-html,
    body.listing-page {
        height: 100%;
        height: 100dvh;
        overflow: hidden !important;
        position: fixed;
        width: 100%;
        touch-action: none;
    }

    /* Page content: full viewport */
    .listing-page .ce-page-content {
        height: 100vh;
        height: 100dvh;
        overflow: hidden;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
    }

    /* Container: flexbox column */
    .ce-listing-container {
        display: flex;
        flex-direction: column;
        height: 100%;
        padding: 0 !important;
        margin: 0 !important;
        max-width: none !important;
    }

    /* ========== MESSAGES AREA ========== */

    /* Messages utilisateur: bulle droite */
    .ce-message-user {
        align-self: flex-end !important;
        max-width: 82% !important;
        background: rgba(35, 28, 60, 0.9) !important;
        border: 1px solid rgba(120, 100, 180, 0.15) !important;
        padding: 11px 16px !important;
        border-radius: 20px 20px 4px 20px !important;
        margin: 0 !important;
        font-size: 15px !important;
        line-height: 1.5 !important;
        word-wrap: break-word !important;
    }

    /* Zone scrollable: entre header (48px) et footer (~120px) */
    .ce-chat-wrapper {
        flex: 1 1 0%;
        height: 0;
        min-height: 0;
        overflow-y: scroll;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-y: contain;
        touch-action: pan-y;
        padding: 64px 16px 140px 16px;
    }

    /* Gradient fade supprimé — causait une ligne visible */
    .ce-chat-wrapper::before {
        display: none;
    }

    /* Messages: espacement coherent */
    .ce-messages {
        gap: 24px;
        padding: 0;
        display: flex;
        flex-direction: column;
    }

    /* Messages assistant */
    .ce-message-assistant {
        align-self: flex-start !important;
        max-width: 100% !important;
        margin: 0 !important;
    }

    /* Messages assistant normaux: pas de bg (sauf premier) */
    .ce-message-assistant:not(:first-child) .ce-message-assistant-content {
        background: transparent !important;
        border: none !important;
        padding: 0 4px !important;
        font-size: 15px !important;
        line-height: 1.65 !important;
    }

    /* Premier message AI: garde le glassmorphism */
    .ce-message-assistant:first-child .ce-message-assistant-content {
        padding: 16px 18px !important;
        border-radius: 16px !important;
        margin-right: 8px !important;
    }

    /* ========== FOOTER - ChatGPT Style Input ========== */
    .ce-chat-footer {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 500;
        background: #12101c;
        padding: 10px 14px;
        padding-bottom: max(10px, env(safe-area-inset-bottom));
        border-top: none;
    }

    /* Scroll to bottom */
    .ce-scroll-to-bottom {
        position: fixed;
        bottom: calc(130px + env(safe-area-inset-bottom, 0px));
        left: 50%;
        transform: translateX(-50%);
        min-width: 40px;
        min-height: 40px;
        width: 40px;
        height: 40px;
        border-radius: 50%;
        background: rgba(25, 22, 42, 0.95);
        backdrop-filter: blur(8px);
        border: 1px solid rgba(255, 255, 255, 0.1);
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        z-index: 600;
        opacity: 0;
        pointer-events: none;
        transition: all 0.3s ease;
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
    }

    .ce-scroll-to-bottom.visible {
        opacity: 1;
        pointer-events: auto;
    }

    .ce-scroll-to-bottom:active {
        transform: translateX(-50%) scale(0.9);
    }

    .ce-scroll-to-bottom svg {
        width: 18px;
        height: 18px;
        stroke: rgba(255, 255, 255, 0.8);
        stroke-width: 2.5;
    }

    /* Suggestions - Horizontal scroll */
    .ce-chat-suggestions {
        display: flex;
        gap: 8px;
        overflow-x: auto;
        padding-bottom: 8px;
        margin-bottom: 8px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .ce-chat-suggestions::-webkit-scrollbar {
        display: none;
    }

    .ce-chat-suggestion {
        flex-shrink: 0;
        padding: 8px 14px;
        background: rgba(255, 255, 255, 0.04);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 20px;
        color: rgba(255, 255, 255, 0.8);
        font-size: 13px;
        font-weight: 500;
        white-space: nowrap;
        cursor: pointer;
        transition: all 0.2s ease;
        -webkit-tap-highlight-color: transparent;
    }

    .ce-chat-suggestion:active {
        transform: scale(0.96);
        background: rgba(255, 255, 255, 0.08);
        border-color: rgba(255, 255, 255, 0.2);
    }

    /* ========== INPUT BAR - ChatGPT Style Container ========== */
    .ce-chat-input-bar {
        display: flex;
        align-items: center;
        gap: 10px;
        background: rgba(25, 22, 40, 0.9);
        border: 1px solid rgba(255, 255, 255, 0.08);
        border-radius: 22px;
        padding: 6px 6px 6px 18px;
        min-height: 48px;
        transition: border-color 0.2s ease, box-shadow 0.2s ease;
    }

    .ce-chat-input-bar:focus-within {
        border-color: rgba(255, 255, 255, 0.15);
        box-shadow: none;
    }

    .ce-chat-input {
        flex: 1;
        background: transparent;
        border: none;
        color: rgba(255, 255, 255, 0.95);
        font-size: 16px !important; /* Prevent iOS zoom */
        line-height: 1.4;
        padding: 6px 0;
        outline: none !important;
        text-align: left;
        min-height: 20px;
    }

    .ce-chat-input:focus {
        outline: none !important;
        box-shadow: none !important;
    }

    .ce-chat-input::placeholder {
        color: rgba(255, 255, 255, 0.3);
        text-align: left;
        font-size: 14px;
    }

    /* Send button - Circle, clean, no glow */
    .ce-chat-send-btn {
        min-width: 34px;
        min-height: 34px;
        width: 34px;
        height: 34px;
        border-radius: 50%;
        background: #ffffff;
        border: none;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: all 0.2s ease;
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
        flex-shrink: 0;
        box-shadow: none;
    }

    .ce-chat-send-btn::after {
        display: none;
    }

    .ce-chat-send-btn:hover {
        box-shadow: none;
    }

    .ce-chat-send-btn:active {
        transform: scale(0.9);
        background: rgba(255, 255, 255, 0.85);
    }

    .ce-chat-send-btn svg {
        width: 16px;
        height: 16px;
        stroke: #000000;
        stroke-width: 2.5;
    }

    /* ========== ANNONCES CARDS MOBILE ========== */
    .ce-chat-annonces:not(.autres) {
        display: flex;
        flex-direction: column;
        gap: 14px;
        margin-top: 16px;
    }

    .ce-annonce-card {
        border-radius: 16px !important;
        overflow: hidden;
        border: 1px solid rgba(255, 255, 255, 0.06) !important;
        background: rgba(20, 18, 30, 0.6) !important;
    }

    .ce-annonce-card-image {
        border-radius: 0 !important;
        aspect-ratio: 16/10 !important;
    }

    .ce-annonce-card-content {
        padding: 14px !important;
    }
}

/* Desktop: Cacher le bouton scroll-to-bottom */
.ce-scroll-to-bottom {
    display: none;
}

@media (max-width: 768px) {
    .ce-scroll-to-bottom {
        display: flex;
    }
}

.ce-listing-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    max-width: 860px;
    width: 100%;
    margin: 0 auto;
    padding: 24px 32px;
    padding-top: 59px;
    padding-bottom: 200px;
}

/* ========== TITRE DE RECHERCHE ========== */
/* Masqué visuellement mais conservé pour la sauvegarde */
.ce-search-title-bar {
    display: none;
}

.ce-search-title {
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 500;
    color: var(--text-muted);
    letter-spacing: 0.01em;
    line-height: 1.4;
    text-align: center;
}

.ce-search-subtitle {
    font-size: 13px;
    font-weight: 500;
    color: var(--accent);
    letter-spacing: 0.01em;
}

.ce-search-subtitle:empty {
    display: none;
}

/* ========== CHAT AREA ========== */
.ce-chat-wrapper {
    flex: 1;
    overflow-y: auto;
}

.ce-messages {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

/* ========== MESSAGE UTILISATEUR ========== */
.ce-message-user {
    align-self: flex-end;
    max-width: 70%;
    background: rgba(35, 28, 60, 0.9);
    border: 1px solid rgba(120, 100, 180, 0.15);
    color: var(--text-main);
    padding: 16px 20px;
    border-radius: 20px 20px 4px 20px;
    font-size: 17px;
    font-weight: 400;
    line-height: 1.6;
    animation: slideUp 0.3s ease;
}

/* ========== MESSAGE ASSISTANT ========== */
.ce-message-assistant {
    align-self: flex-start;
    max-width: 100%;
    animation: slideUp 0.4s ease;
}

/* ── Feedback bar (like/dislike) ── */
.ce-feedback-bar {
    display: flex;
    gap: 4px;
    margin-top: 2px;
    margin-bottom: 10px;
    opacity: 0;
    animation: ceFeedbackFadeIn 0.3s ease forwards;
    animation-delay: 0.2s;
}
.ce-feedback-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: none;
    background: transparent;
    color: rgba(255,255,255,0.2);
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
}
.ce-feedback-btn:hover {
    color: rgba(255,255,255,0.5);
    background: rgba(255,255,255,0.06);
}
.ce-feedback-btn.active.like {
    color: #32D74B;
    background: rgba(50,215,75,0.12);
}
.ce-feedback-btn.active.dislike {
    color: #FF453A;
    background: rgba(255,69,58,0.12);
}
@keyframes ceFeedbackFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.ce-message-assistant-content {
    font-size: 18px;
    font-weight: 400;
    color: var(--text-main);
    line-height: 1.7;
    margin-bottom: 24px;
    letter-spacing: -0.01em;
}

/* Markdown styling pour les messages */
.ce-message-assistant-content p {
    margin: 0 0 16px 0;
}

.ce-message-assistant-content p:last-child {
    margin-bottom: 0;
}

.ce-message-assistant-content strong {
    color: #fff;
    font-weight: 600;
}

/* Style spécial pour "Bonjour, je suis Orion !" */
.ce-message-assistant-content p:first-child strong:first-child,
.ce-message-assistant-content > strong:first-child {
    font-size: 24px;
    font-weight: 700;
    display: inline;
    background: linear-gradient(135deg, #fff 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.ce-message-assistant-content em {
    font-style: italic;
    color: var(--text-secondary);
}

.ce-message-assistant-content .ce-md-title {
    font-size: 19px;
    font-weight: 700;
    color: #ffffff;
    margin: 20px 0 6px 0;
    text-transform: none;
    letter-spacing: -0.01em;
    line-height: 1.4;
}

.ce-message-assistant-content .ce-md-title:first-child {
    margin-top: 0;
}

/* Markdown lists */
.ce-message-assistant-content .ce-md-list {
    list-style: none;
    padding-left: 0;
    margin: 4px 0;
}

.ce-message-assistant-content .ce-md-list-num {
    list-style: none;
    padding-left: 0;
    margin: 4px 0;
    counter-reset: md-counter;
}

.ce-message-assistant-content .ce-md-li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 2px;
    line-height: 1.5;
    color: var(--text-main);
}

.ce-message-assistant-content .ce-md-li::before {
    content: '•';
    position: absolute;
    left: 4px;
    color: var(--accent);
    font-weight: 700;
}

.ce-message-assistant-content .ce-md-li-num {
    position: relative;
    padding-left: 24px;
    margin-bottom: 2px;
    line-height: 1.5;
    color: var(--text-main);
    counter-increment: md-counter;
}

.ce-message-assistant-content .ce-md-li-num::before {
    content: counter(md-counter) '.';
    position: absolute;
    left: 2px;
    color: var(--accent);
    font-weight: 700;
}

/* Markdown separators */
.ce-message-assistant-content .ce-md-separator {
    border: none;
    border-top: 1px solid rgba(255,255,255,0.1);
    margin: 10px 0;
}

/* Typewriter cursor */
.ce-typewriter-cursor {
    display: inline-block;
    width: 3px;
    height: 1.1em;
    background: var(--accent);
    margin-left: 3px;
    animation: ce-blink 0.8s infinite;
    vertical-align: text-bottom;
    border-radius: 2px;
}

/* ========== THINKING INDICATOR (modern ChatGPT style) ========== */
.ce-thinking {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 0;
    transition: opacity 0.2s, transform 0.2s;
}

.ce-thinking-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    color: var(--accent, #a78bfa);
    flex-shrink: 0;
    animation: ce-think-spin 3s linear infinite;
}

@keyframes ce-think-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.ce-thinking-text {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary, #9ca3af);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.ce-thinking-dots {
    display: inline-flex;
    gap: 2px;
    color: var(--text-muted, #6b7280);
    font-size: 16px;
    font-weight: 600;
}

.ce-thinking-dots span {
    animation: ce-dot-pulse 1.4s ease-in-out infinite;
}

.ce-thinking-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.ce-thinking-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes ce-dot-pulse {
    0%, 60%, 100% { opacity: 0.2; }
    30% { opacity: 1; }
}

/* Legacy dots fallback */
.ce-typing {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px 0;
}

.ce-typing-dot {
    width: 10px;
    height: 10px;
    background: var(--text-muted);
    border-radius: 50%;
    animation: ce-typing 1.2s ease-in-out infinite;
}

.ce-typing-dot:nth-child(2) {
    animation-delay: 0.15s;
}

.ce-typing-dot:nth-child(3) {
    animation-delay: 0.3s;
}

/* ========== STREAM-IN TEXT ANIMATION ========== */
.ce-stream-in {
    animation: ce-stream-fade 0.3s ease-out;
}

@keyframes ce-stream-fade {
    from { opacity: 0.4; }
    to { opacity: 1; }
}

/* ========== CARDS ANNONCES ========== */
.ce-chat-annonces {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin-top: 20px;
}

.ce-chat-card {
    background: linear-gradient(145deg, rgba(28, 22, 50, 0.95) 0%, rgba(18, 14, 35, 0.98) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.35s cubic-bezier(0.22, 1, 0.36, 1);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3), 0 2px 4px rgba(0, 0, 0, 0.2);
    position: relative;
    display: flex;
    flex-direction: column;
}

.ce-chat-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 14px;
    opacity: 0;
    transition: opacity 0.35s ease;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.03) 0%, transparent 60%);
    pointer-events: none;
}

.ce-chat-card:hover {
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
}

.ce-chat-card:hover::after {
    opacity: 1;
}

/* Image container */
.ce-chat-card-image {
    position: relative;
    height: 150px;
    background: #0a0812;
    overflow: hidden;
}

.ce-chat-card-image::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40px;
    background: linear-gradient(to top, rgba(18, 14, 35, 0.6), transparent);
    pointer-events: none;
    z-index: 1;
}

.ce-chat-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.ce-chat-card:hover .ce-chat-card-image img {
    transform: scale(1.06);
}

/* Badge compteur images */
.ce-card-image-count {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 5px 10px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 500;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Body card */
.ce-chat-card-body {
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
}

/* Header: Titre + Prix */
.ce-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
}

.ce-card-title-wrap {
    flex: 1;
    min-width: 0;
}

.ce-chat-card-title {
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.ce-chat-card-finition {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    margin: 3px 0 0 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ce-chat-card-price {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
    white-space: nowrap;
}

/* Specs grid */
.ce-card-specs-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 14px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.04);
}

.ce-card-spec {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    color: var(--text-secondary);
}

.ce-card-spec-icon {
    width: 15px;
    height: 15px;
    opacity: 0.5;
    flex-shrink: 0;
    color: var(--accent);
}

.ce-card-spec-value {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Footer card — toujours aligné en bas grâce à margin-top:auto */
.ce-card-footer {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    margin-top: auto;
}

/* Badge vendeur sur l'image */
.ce-card-vendor-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 2;
    backdrop-filter: blur(8px);
}

.ce-vendor-pro {
    background: rgba(100, 100, 100, 0.85);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.ce-vendor-particulier {
    background: rgba(34, 34, 34, 0.85);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

/* Badge score de pertinence */
.ce-card-score-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 3px 9px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.3px;
    z-index: 2;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Badge plateforme dans le footer — logo + texte sur 2 lignes */
.ce-card-platform-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 0;
    background: none;
    border: none;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    text-shadow: none;
}

.ce-card-platform-badge .ce-platform-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.ce-card-platform-badge .ce-platform-label {
    font-size: 9px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.45);
    letter-spacing: 0.2px;
}

.ce-card-platform-badge .ce-platform-name {
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
    letter-spacing: 0;
}

.ce-platform-logo {
    border-radius: 3px;
    flex-shrink: 0;
    width: 14px;
    height: 14px;
    object-fit: contain;
}

/* Boutons Like/Dislike - Style Tinder */
.ce-card-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ce-card-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid;
    background: rgba(255, 255, 255, 0.03);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
}

.ce-card-action-btn svg {
    width: 20px;
    height: 20px;
    transition: all 0.3s;
}

/* Dislike Button — Subtle grey */
.ce-dislike-btn {
    border-color: rgba(255, 255, 255, 0.12);
}

.ce-dislike-btn svg {
    stroke: rgba(255, 255, 255, 0.35);
}

.ce-dislike-btn:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.25);
    transform: scale(1.05) rotate(-5deg);
}

.ce-dislike-btn:hover svg {
    stroke: rgba(255, 255, 255, 0.55);
}

/* Like Button — Pink */
.ce-like-btn {
    border-color: rgba(255, 159, 237, 0.35);
}

.ce-like-btn svg {
    stroke: #FF9FED;
    transition: all 0.3s;
}

.ce-like-btn:hover {
    border-color: rgba(255, 159, 237, 0.7);
    transform: scale(1.05);
}

.ce-like-btn:hover svg {
    stroke: #FFB8F3;
}

/* Like Button - Liked state: filled pink heart */
.ce-like-btn.liked {
    background: #FF9FED;
    border-color: #FF9FED;
}

.ce-like-btn.liked svg {
    fill: #ffffff;
    stroke: #ffffff;
}

/* Swipe Overlay et Animation */
.ce-chat-card {
    position: relative;
}

.ce-card-swipe-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10;
    opacity: 0;
    pointer-events: none;
    border-radius: 12px;
    transition: opacity 0.4s ease;
}

.ce-card-swipe-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-15deg) scale(0.5);
    z-index: 11;
    font-size: 48px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 4px;
    opacity: 0;
    pointer-events: none;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Animation Like (rose/pink) */
@keyframes swipe-like {
    0% {
        transform: translate(-50%, -50%) rotate(-15deg) scale(0.5);
        opacity: 0;
    }
    40% {
        transform: translate(-50%, -50%) rotate(-5deg) scale(1.2);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) rotate(0deg) scale(1);
        opacity: 0.8;
    }
}

.ce-chat-card.swiping-like .ce-card-swipe-overlay {
    opacity: 1;
    background: linear-gradient(135deg, rgba(255, 159, 237, 0.95), rgba(224, 112, 208, 0.95));
}

.ce-chat-card.swiping-like .ce-card-swipe-text {
    color: #ffffff;
    animation: swipe-like 0.5s ease forwards;
}

/* Animation Dislike (grey/subtle) */
@keyframes swipe-dislike {
    0% {
        transform: translate(-50%, -50%) rotate(15deg) scale(0.5);
        opacity: 0;
    }
    40% {
        transform: translate(-50%, -50%) rotate(5deg) scale(1.2);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) rotate(0deg) scale(1);
        opacity: 0.8;
    }
}

.ce-chat-card.swiping-dislike .ce-card-swipe-overlay {
    opacity: 1;
    background: linear-gradient(135deg, rgba(120, 120, 130, 0.9), rgba(80, 80, 90, 0.9));
}

.ce-chat-card.swiping-dislike .ce-card-swipe-text {
    color: rgba(255, 255, 255, 0.8);
    animation: swipe-dislike 0.5s ease forwards;
}

/* Animation de disparition de la card */
@keyframes card-fade-out {
    to {
        opacity: 0;
        transform: scale(0.8);
    }
}

.ce-chat-card.removing {
    animation: card-fade-out 0.3s ease forwards;
    animation-delay: 0.5s;
}

/* Pop-up de connexion */
.ce-auth-popup {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.ce-auth-popup-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
}

.ce-auth-popup-content {
    position: relative;
    background: linear-gradient(135deg, rgba(18, 16, 28, 0.98) 0%, rgba(26, 23, 38, 0.98) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 40px;
    max-width: 480px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.ce-auth-popup-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    border: none;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.ce-auth-popup-close:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: rotate(90deg);
}

.ce-auth-popup-close svg {
    stroke: rgba(255, 255, 255, 0.6);
}

.ce-auth-popup-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, rgba(74, 222, 128, 0.15), rgba(250, 204, 21, 0.15));
    border: 2px solid rgba(74, 222, 128, 0.3);
    border-radius: 50%;
    margin: 0 auto 24px;
}

.ce-auth-popup-icon svg {
    stroke: var(--accent);
    fill: none;
}

.ce-auth-popup-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-main);
    margin: 0 0 16px;
}

.ce-auth-popup-text {
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-sub);
    margin: 0 0 32px;
}

.ce-auth-popup-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ce-auth-popup-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.ce-auth-popup-btn-primary {
    background: linear-gradient(135deg, #4ade80, #facc15);
    color: #000000;
    border: none;
}

.ce-auth-popup-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(74, 222, 128, 0.3);
}

.ce-auth-popup-btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.ce-auth-popup-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
}

/* ========== SIGNUP BANNER (guests — chat) ========== */
.ce-signup-banner {
    max-width: 860px;
    margin: 0 auto 10px;
    background: rgba(18, 16, 28, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 0;
    position: relative;
    overflow: hidden;
    animation: slideUpBanner 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    box-shadow: none;
    backdrop-filter: blur(12px);
}

.ce-signup-banner-glow {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
}

@keyframes slideUpBanner {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

.ce-signup-banner.hiding {
    animation: slideDownBanner 0.25s ease forwards;
}

@keyframes slideDownBanner {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(10px); }
}

.ce-signup-banner-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 28px;
    height: 28px;
    border: none;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    padding: 0;
    z-index: 2;
}

.ce-signup-banner-close:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: rotate(90deg);
}

.ce-signup-banner-close svg {
    stroke: rgba(255, 255, 255, 0.5);
}

.ce-signup-banner-content {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 48px 16px 18px;
}

.ce-signup-banner-icon-wrap {
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ce-signup-banner-icon-wrap svg {
    stroke: rgba(255, 255, 255, 0.7);
    fill: none;
}

.ce-signup-banner-body {
    flex: 1;
    min-width: 0;
}

.ce-signup-banner-title {
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 2px;
    line-height: 1.3;
}

.ce-signup-banner-text {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    margin: 0;
    line-height: 1.4;
}

.ce-signup-banner-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.ce-signup-banner-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 18px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 10px;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.2s;
}

.ce-signup-banner-btn-primary {
    background: linear-gradient(135deg, #4ade80, #22c55e);
    color: #000;
    box-shadow: 0 2px 8px rgba(74, 222, 128, 0.25);
}

.ce-signup-banner-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(74, 222, 128, 0.35);
}

.ce-signup-banner-btn-secondary {
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.ce-signup-banner-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

@media (max-width: 600px) {
    .ce-signup-banner-content {
        flex-wrap: wrap;
        gap: 12px;
        padding: 14px 40px 14px 14px;
    }
    .ce-signup-banner-body { width: calc(100% - 58px); }
    .ce-signup-banner-actions {
        width: 100%;
    }
    .ce-signup-banner-btn {
        flex: 1;
        padding: 10px 14px;
    }
}

/* Ancien style pour rétrocompatibilité */
.ce-card-like-btn {
    margin-left: auto;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.ce-card-like-btn svg {
    width: 17px;
    height: 17px;
    stroke: var(--text-muted);
    fill: none;
    transition: all 0.2s;
}

.ce-card-like-btn:hover {
    background: rgba(255, 255, 255, 0.12);
}

.ce-card-like-btn:hover svg {
    stroke: #f87171;
}

.ce-card-like-btn.liked svg {
    stroke: #f87171;
    fill: #f87171;
}

/* ========== SECTION AUTRES ANNONCES ========== */
.ce-autres-section {
    margin-top: 32px;
    position: relative;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.ce-autres-title {
    font-size: 17px;
    color: var(--text-main);
    margin: 0 0 16px 0;
    font-weight: 600;
    line-height: 1.6;
    letter-spacing: -0.01em;
}

/* .ce-autres-wrapper removed — no nav buttons needed */

/* Scroll horizontal */
.ce-chat-annonces.autres {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    grid-template-columns: none !important;
    gap: 16px;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 14px;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
    /* Fade right edge like explore */
    mask-image: linear-gradient(90deg, #000 0%, #000 calc(100% - 32px), transparent);
    -webkit-mask-image: linear-gradient(90deg, #000 0%, #000 calc(100% - 32px), transparent);
}

.ce-chat-annonces.autres::-webkit-scrollbar {
    height: 4px;
}

.ce-chat-annonces.autres::-webkit-scrollbar-track {
    background: transparent;
}

.ce-chat-annonces.autres::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
}

.ce-chat-annonces.autres .ce-chat-card {
    flex: 0 0 190px !important;
    min-width: 190px !important;
    max-width: 190px !important;
    transform: none !important;
}

.ce-chat-annonces.autres .ce-chat-card:hover {
    transform: translateY(-3px) !important;
}

.ce-chat-annonces.autres .ce-chat-card-image {
    height: 100px;
}

.ce-chat-annonces.autres .ce-chat-card-body {
    padding: 10px;
    gap: 4px;
}

.ce-chat-annonces.autres .ce-card-header {
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
    gap: 4px;
}

.ce-chat-annonces.autres .ce-card-title-wrap {
    flex: 1;
    min-width: 0;
}

.ce-chat-annonces.autres .ce-chat-card-title {
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ce-chat-annonces.autres .ce-chat-card-finition {
    display: none;
}

.ce-chat-annonces.autres .ce-chat-card-price {
    font-size: 13px;
    white-space: nowrap;
    flex-shrink: 0;
}

.ce-chat-annonces.autres .ce-card-specs-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2px 6px;
    padding: 0;
    margin: 0;
}

.ce-chat-annonces.autres .ce-card-spec {
    gap: 3px;
}

.ce-chat-annonces.autres .ce-card-spec-icon {
    width: 10px;
    height: 10px;
}

.ce-chat-annonces.autres .ce-card-spec-value {
    font-size: 9px;
}

.ce-chat-annonces.autres .ce-card-footer {
    padding-top: 6px;
}

.ce-chat-annonces.autres .ce-card-actions .ce-card-action-btn {
    width: 30px;
    height: 30px;
}

.ce-chat-annonces.autres .ce-card-actions .ce-card-action-btn svg {
    width: 14px;
    height: 14px;
}

/* Bouton Match vert/jaune sous la ligne scrollable */
.ce-match-trigger-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 16px auto 0;
    padding: 12px 32px;
    background: linear-gradient(135deg, #4ade80 0%, #facc15 100%);
    border: none;
    border-radius: 50px;
    color: #0f1a0f;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: 0.3px;
    box-shadow: 0 4px 16px rgba(74, 222, 128, 0.25);
}

.ce-match-trigger-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(74, 222, 128, 0.35), 0 0 20px rgba(250, 204, 21, 0.15);
    filter: brightness(1.08);
}

.ce-match-trigger-btn svg {
    width: 18px;
    height: 18px;
    fill: #0f1a0f;
    stroke: #0f1a0f;
    transition: transform 0.3s ease;
}

.ce-match-trigger-btn:hover svg {
    transform: scale(1.15);
}

/* ========== MODELES SUGGERES ========== */
.ce-modeles-suggeres {
    margin-top: 24px;
    padding: 18px 22px;
    background: var(--accent-light);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-m);
    position: relative;
    overflow: hidden;
}

.ce-modeles-suggeres::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
}

.ce-modeles-suggeres-title {
    font-size: 13px;
    color: var(--accent);
    margin-bottom: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ce-modeles-suggeres-list {
    font-size: 15px;
    color: var(--text-main);
    line-height: 1.7;
}

/* ========== OPTIONS SIDEBAR (Claude Style) ========== */

/* Trigger Button (legacy - kept for sidebar criteria count) */
.ce-criteria-count {
    display: none;
}

/* Overlay */
.ce-sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 90;
}

.ce-sidebar-overlay.open {
    opacity: 1;
    visibility: visible;
}

/* Sidebar */
.ce-options-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 320px;
    max-width: 85vw;
    background: #1a1a24;
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 100;
    display: flex;
    flex-direction: column;
}

.ce-options-sidebar.open {
    transform: translateX(0);
}

/* Sidebar Header */
.ce-sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.ce-sidebar-header h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-main);
}

.ce-sidebar-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: transparent;
    border: none;
    border-radius: 6px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.ce-sidebar-close:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-main);
}

/* Sidebar Content */
.ce-sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

/* Sections */
.ce-sidebar-section {
    margin-bottom: 24px;
}

.ce-section-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.ce-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    margin-bottom: 12px;
}

.ce-section-chevron {
    color: var(--text-muted);
    transition: transform 0.2s ease;
}

.ce-sidebar-section.collapsed .ce-section-chevron {
    transform: rotate(-90deg);
}

.ce-sidebar-section.collapsed .ce-criteria-body {
    display: none;
}

/* Mode Toggle */
.ce-mode-toggle {
    display: flex;
    gap: 8px;
}

.ce-mode-option {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ce-mode-option:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.12);
    color: var(--text-main);
}

.ce-mode-option.active {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

.ce-mode-option svg {
    opacity: 0.6;
}

.ce-mode-option:hover svg,
.ce-mode-option.active svg {
    opacity: 1;
}

/* Criteria Body */
.ce-criteria-body {
    margin-top: 8px;
}

/* Criteria Chips */
.ce-criteria-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ce-criteria-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    font-size: 12px;
    color: var(--text-main);
    transition: all 0.2s ease;
}

.ce-criteria-chip:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
}

.ce-criteria-chip-label {
    color: var(--text-muted);
    font-weight: 400;
}

.ce-criteria-chip-value {
    color: var(--accent);
    font-weight: 600;
}

.ce-criteria-chip-remove {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    background: transparent;
    border: none;
    border-radius: 4px;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 14px;
    margin-left: 4px;
    transition: all 0.2s ease;
}

.ce-criteria-chip-remove:hover {
    background: rgba(255, 100, 100, 0.2);
    color: #ff6b6b;
}

.ce-criteria-empty {
    color: var(--text-muted);
    font-size: 13px;
    padding: 8px 0;
}

/* ========== QUICK FILTERS ========== */
.ce-quick-filter-group {
    margin-bottom: 16px;
}

.ce-quick-filter-group:last-child {
    margin-bottom: 0;
}

.ce-quick-filter-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.ce-quick-filter-title svg {
    opacity: 0.6;
    color: var(--accent);
}

.ce-quick-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ce-quick-filter-btn {
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.ce-quick-filter-btn:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.15);
    color: var(--text-main);
    transform: translateY(-1px);
}

.ce-quick-filter-btn.active {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.25);
    color: #ffffff;
    box-shadow: none;
}

.ce-quick-filter-btn.active:hover {
    background: rgba(255, 255, 255, 0.16);
}

/* ========== SORT OPTIONS ========== */
.ce-sort-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ce-sort-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.ce-sort-btn svg {
    opacity: 0.5;
    transition: opacity 0.2s;
}

.ce-sort-btn:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.15);
    color: var(--text-main);
}

.ce-sort-btn:hover svg {
    opacity: 0.8;
}

.ce-sort-btn.active {
    background: linear-gradient(135deg, rgba(74, 222, 128, 0.12) 0%, rgba(34, 197, 94, 0.08) 100%);
    border-color: rgba(74, 222, 128, 0.4);
    color: #4ade80;
}

.ce-sort-btn.active svg {
    opacity: 1;
    color: #4ade80;
}

/* ========== RESET ALL BUTTON ========== */
.ce-reset-all-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px 16px;
    margin-top: 16px;
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 10px;
    color: #f87171;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.ce-reset-all-btn:hover {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.4);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.15);
}

.ce-reset-all-btn svg {
    transition: transform 0.3s ease;
}

.ce-reset-all-btn:hover svg {
    transform: rotate(-45deg);
}

/* ========== SECTION DIVIDERS ========== */
.ce-sidebar-section {
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.ce-sidebar-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

/* ========== ENHANCED SIDEBAR ANIMATIONS ========== */
@keyframes sidebarSlideIn {
    from {
        transform: translateX(100%);
        opacity: 0.8;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ce-options-sidebar.open {
    animation: sidebarSlideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.ce-options-sidebar.open .ce-sidebar-section {
    animation: fadeInUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    animation-fill-mode: both;
}

.ce-options-sidebar.open .ce-sidebar-section:nth-child(1) { animation-delay: 0.05s; }
.ce-options-sidebar.open .ce-sidebar-section:nth-child(2) { animation-delay: 0.1s; }
.ce-options-sidebar.open .ce-sidebar-section:nth-child(3) { animation-delay: 0.15s; }
.ce-options-sidebar.open .ce-sidebar-section:nth-child(4) { animation-delay: 0.2s; }

/* ========== ENHANCED TRIGGER BUTTON (removed - replaced by market selector) ========== */

/* Badge with animation */
.ce-criteria-count {
    display: none;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    text-align: center;
    line-height: 20px;
}

.ce-criteria-count.visible {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* ========== ENHANCED SIDEBAR HEADER ========== */
.ce-sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    background: transparent;
}

.ce-sidebar-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 10px;
}

.ce-sidebar-header h3::before {
    content: '';
    display: block;
    width: 3px;
    height: 16px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
}

/* ========== ENHANCED MODE TOGGLE ========== */
.ce-mode-option {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.ce-mode-option::before {
    display: none;
}

.ce-mode-option:hover::before {
    display: none;
}

.ce-mode-option.active {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    box-shadow: none;
}

.ce-mode-option.active::before {
    display: none;
}

/* Orion Expert Info Section */
.ce-orion-info {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 14px 16px !important;
    margin-bottom: 20px;
}

.ce-orion-info-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.ce-orion-info-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 6px;
}

.ce-orion-info-icon svg {
    color: rgba(255, 255, 255, 0.7);
}

.ce-orion-info-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.ce-orion-info-content {
    font-size: 12px;
    color: var(--text-sub);
    line-height: 1.6;
    padding-left: 38px;
}

.ce-orion-info-content p {
    margin: 0;
}

/* Mode Descriptions */
.ce-mode-descriptions {
    margin-top: 12px;
}

.ce-mode-description {
    font-size: 12px;
    color: var(--text-sub);
    line-height: 1.5;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    border-left: 2px solid rgba(255, 255, 255, 0.15);
}

.ce-mode-description strong {
    color: var(--accent);
    display: block;
    margin-bottom: 4px;
}

/* ========== ENHANCED CRITERIA CHIPS ========== */
.ce-criteria-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    font-size: 12px;
    color: var(--text-main);
    transition: all 0.2s ease;
}

.ce-criteria-chip:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.18);
}

.ce-criteria-chip-remove:hover {
    background: rgba(239, 68, 68, 0.25);
    color: #f87171;
    transform: scale(1.1);
}

/* Hide trigger on mobile when sidebar is open */
@media (max-width: 768px) {
    .ce-options-sidebar {
        width: 100%;
        max-width: 100%;
    }

    .ce-quick-filters {
        gap: 6px;
    }

    .ce-quick-filter-btn {
        padding: 7px 12px;
        font-size: 11px;
    }

    .ce-sort-options {
        gap: 6px;
    }

    .ce-sort-btn {
        padding: 7px 10px;
        font-size: 11px;
    }
}

/* ========== MARKET SELECTOR (Top Right) ========== */
.ce-market-selector {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 50;
}

.ce-market-selector-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: rgba(20, 18, 30, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.ce-market-selector-btn:hover {
    background: rgba(25, 22, 40, 0.9);
    border-color: rgba(255, 255, 255, 0.15);
    color: var(--text-main);
}

.ce-market-flag {
    font-size: 16px;
    line-height: 1;
}

.ce-market-label {
    font-size: 13px;
}

.ce-market-chevron {
    opacity: 0.5;
    transition: transform 0.2s ease;
}

.ce-market-selector.open .ce-market-chevron {
    transform: rotate(180deg);
}

.ce-market-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 160px;
    background: rgba(20, 18, 30, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 4px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    animation: ce-dropdown-in 0.15s ease;
}

@keyframes ce-dropdown-in {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

.ce-market-selector.open .ce-market-dropdown {
    display: block;
}

.ce-market-option {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 14px;
    background: none;
    border: none;
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: inherit;
}

.ce-market-option:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-main);
}

.ce-market-option.active {
    background: rgba(210, 133, 255, 0.12);
    color: #D285FF;
}

.ce-market-option span {
    font-size: 16px;
}

/* ========== CHAT INPUT FOOTER ========== */
.ce-chat-footer {
    position: fixed;
    bottom: 0;
    left: var(--sidebar-width, 260px);
    right: 0;
    padding: 16px 32px 28px;
    background: linear-gradient(to top,
        #12101c 0%,
        #12101c 60%,
        rgba(18, 16, 28, 0.85) 80%,
        rgba(18, 16, 28, 0) 100%
    );
    z-index: 20;
}

body.menu-closed .ce-chat-footer {
    left: var(--sidebar-width-closed, 50px);
}

.ce-chat-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 14px;
    max-width: 860px;
    margin-left: auto;
    margin-right: auto;
}

.ce-chat-suggestion {
    position: relative;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 10px 18px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    box-shadow: none;
}

.ce-chat-suggestion::before {
    display: none;
}

.ce-chat-suggestion:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    transform: none;
    box-shadow: none;
}

.ce-chat-suggestion:active {
    transform: scale(0.97);
    box-shadow: none;
}

.ce-chat-suggestion[data-index="0"],
.ce-chat-suggestion[data-index="1"],
.ce-chat-suggestion[data-index="2"] {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.08);
}

/* Animation d'entrée pour les suggestions */
.ce-chat-suggestion {
    opacity: 0;
    transform: translateY(10px);
}

.ce-chat-input-bar {
    display: flex;
    align-items: center;
    height: 54px;
    background: rgba(25, 22, 40, 0.9);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 26px;
    padding: 4px 6px 4px 24px;
    max-width: 860px;
    margin: 0 auto;
    box-shadow: none;
    transition: border-color 0.2s ease;
}

.ce-chat-input-bar:focus-within {
    border-color: rgba(255, 255, 255, 0.18);
    box-shadow: none;
}

.ce-chat-input {
    flex: 1;
    height: 100%;
    background: transparent;
    border: none;
    color: var(--text-main);
    font-family: var(--font-chat);
    font-size: 16px;
    font-weight: 400;
    outline: none;
}

.ce-chat-input::placeholder {
    color: var(--text-muted);
}

.ce-chat-send-btn {
    width: 42px;
    height: 42px;
    min-width: 42px;
    background: #ffffff;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000000;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: none;
    position: relative;
    overflow: hidden;
}

.ce-chat-send-btn::after {
    display: none;
}

.ce-chat-send-btn:hover::after {
    display: none;
}

.ce-chat-send-btn:hover {
    background: rgba(255, 255, 255, 0.85);
    transform: none;
    box-shadow: none;
}

.ce-chat-send-btn:disabled {
    background: rgba(255, 255, 255, 0.2);
    cursor: not-allowed;
    opacity: 0.5;
    box-shadow: none;
}

.ce-chat-send-btn:disabled::after {
    display: none;
}

.ce-chat-send-btn svg {
    width: 18px;
    height: 18px;
    stroke: #000000;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 1100px) {
    .ce-chat-annonces {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 900px) {
    .ce-chat-annonces {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    .ce-chat-card-image {
        height: 140px;
    }
}

@media (max-width: 768px) {
    /* Smooth scrolling */
    html {
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
    }

    body {
        overflow-x: hidden;
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }

    .ce-listing-container {
        padding: 16px 12px;
        padding-bottom: 140px;
        will-change: scroll-position;
    }

    /* Chat wrapper - coherent avec le premier block */
    .ce-chat-wrapper {
        flex: 1 1 0% !important;
        height: 0 !important;
        min-height: 0 !important;
        overflow-y: scroll !important;
        overflow-x: hidden !important;
        -webkit-overflow-scrolling: touch !important;
        overscroll-behavior-y: contain !important;
        touch-action: pan-y !important;
        padding: 64px 20px 160px 20px !important;
    }

    .ce-search-title-bar {
        margin-bottom: 16px;
    }

    /* Messages fluides */
    .ce-messages {
        gap: 28px;
        will-change: transform;
        padding-bottom: 20px;
    }

    .ce-message-assistant,
    .ce-message-user {
        animation: fadeInUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        will-change: transform, opacity;
    }

    @keyframes fadeInUp {
        from {
            opacity: 0;
            transform: translateY(10px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    /* Footer - ChatGPT style */
    .ce-chat-footer {
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        padding: 12px 20px !important;
        padding-bottom: max(14px, env(safe-area-inset-bottom)) !important;
        background: linear-gradient(to top, #12101c 70%, rgba(18, 16, 28, 0.95) 85%, transparent) !important;
        backdrop-filter: none !important;
        border-top: none !important;
        z-index: 500 !important;
        padding-top: 20px !important;
    }

    .ce-message-user {
        max-width: 82% !important;
        font-size: 15px !important;
        padding: 11px 16px !important;
        line-height: 1.5 !important;
        border-radius: 20px 20px 4px 20px !important;
        word-wrap: break-word !important;
    }

    .ce-message-assistant-content {
        font-size: 14px;
        line-height: 1.6;
        letter-spacing: -0.01em;
    }

    .ce-message-assistant-content p:first-child strong:first-child {
        font-size: 18px;
    }

    /* Cartes annonces - colonne unique */
    .ce-chat-annonces:not(.autres) {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 12px !important;
        margin-top: 14px !important;
    }

    .ce-chat-card {
        border-radius: 14px;
        transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
        overflow: hidden;
    }

    .ce-chat-card:active {
        transform: scale(0.98);
    }

    /* Layout horizontal pour les cartes top3 sur mobile */
    .ce-chat-annonces:not(.autres) .ce-chat-card {
        display: flex !important;
        flex-direction: row !important;
    }

    .ce-chat-annonces:not(.autres) .ce-chat-card-image {
        width: 120px !important;
        min-width: 120px !important;
        height: auto !important;
        min-height: 130px !important;
        border-radius: 14px 0 0 14px !important;
    }

    .ce-chat-annonces:not(.autres) .ce-chat-card-body {
        flex: 1 !important;
        padding: 12px 14px !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: space-between !important;
        min-width: 0 !important;
    }

    .ce-chat-annonces:not(.autres) .ce-card-header {
        flex-direction: column !important;
        gap: 2px !important;
    }

    .ce-chat-annonces:not(.autres) .ce-chat-card-title {
        font-size: 14px !important;
        font-weight: 600 !important;
        line-height: 1.3 !important;
    }

    .ce-chat-annonces:not(.autres) .ce-chat-card-finition {
        font-size: 11px !important;
        margin-top: 1px !important;
    }

    .ce-chat-annonces:not(.autres) .ce-chat-card-price {
        font-size: 16px !important;
        font-weight: 700 !important;
        margin-top: 4px !important;
    }

    .ce-chat-annonces:not(.autres) .ce-card-specs-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 4px 10px !important;
        padding: 6px 8px !important;
        margin-top: 6px !important;
    }

    .ce-chat-annonces:not(.autres) .ce-card-spec {
        font-size: 11px !important;
    }

    .ce-chat-annonces:not(.autres) .ce-card-spec-icon {
        width: 12px !important;
        height: 12px !important;
    }

    .ce-chat-annonces:not(.autres) .ce-card-footer {
        padding-top: 8px !important;
        margin-top: 6px !important;
    }

    .ce-chat-annonces:not(.autres) .ce-platform-logo {
        width: 12px !important;
        height: 12px !important;
    }

    .ce-chat-annonces:not(.autres) .ce-platform-label {
        font-size: 8px !important;
    }

    .ce-chat-annonces:not(.autres) .ce-platform-name {
        font-size: 10px !important;
    }

    /* Action buttons - touch friendly */
    .ce-card-action-btn {
        width: 36px;
        height: 36px;
        min-width: 36px;
        min-height: 36px;
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
    }

    .ce-card-action-btn svg {
        width: 16px !important;
        height: 16px !important;
    }

    .ce-card-action-btn:active {
        transform: scale(0.92);
    }

    /* Vendor badge plus discret sur mobile */
    .ce-card-vendor-badge {
        font-size: 9px !important;
        padding: 3px 7px !important;
    }

    /* Suggestions - coherent avec le premier block */
    .ce-chat-suggestions {
        display: flex !important;
        gap: 8px !important;
        overflow-x: auto !important;
        flex-wrap: nowrap !important;
        padding-bottom: 8px !important;
        margin-bottom: 8px !important;
        -webkit-overflow-scrolling: touch !important;
        scrollbar-width: none !important;
    }

    .ce-chat-suggestions::-webkit-scrollbar {
        display: none !important;
    }

    .ce-chat-suggestion {
        flex-shrink: 0 !important;
        padding: 8px 14px !important;
        background: rgba(255, 255, 255, 0.04) !important;
        border: 1px solid rgba(255, 255, 255, 0.1) !important;
        border-radius: 20px !important;
        color: rgba(255, 255, 255, 0.8) !important;
        font-size: 13px !important;
        font-weight: 500 !important;
        white-space: nowrap !important;
        cursor: pointer !important;
        transition: all 0.2s ease !important;
        -webkit-tap-highlight-color: transparent !important;
    }

    .ce-chat-suggestion:active {
        transform: scale(0.96) !important;
        background: rgba(255, 255, 255, 0.08) !important;
        border-color: rgba(255, 255, 255, 0.2) !important;
    }

    /* Input bar - ChatGPT style container */
    .ce-chat-input-bar {
        display: flex !important;
        align-items: center !important;
        gap: 10px !important;
        background: rgba(25, 22, 40, 0.9) !important;
        border: 1px solid rgba(255, 255, 255, 0.08) !important;
        border-radius: 22px !important;
        padding: 6px 6px 6px 18px !important;
        height: auto !important;
        min-height: 48px !important;
        transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
    }

    .ce-chat-input-bar:focus-within {
        border-color: rgba(255, 255, 255, 0.15) !important;
        box-shadow: none !important;
    }

    .ce-chat-input {
        flex: 1 !important;
        background: transparent !important;
        border: none !important;
        color: rgba(255, 255, 255, 0.95) !important;
        font-size: 16px !important;
        line-height: 1.4 !important;
        padding: 6px 0 !important;
        outline: none !important;
        text-align: left !important;
        min-height: 20px !important;
    }

    .ce-chat-input:focus {
        outline: none !important;
        box-shadow: none !important;
    }

    .ce-chat-input::placeholder {
        color: rgba(255, 255, 255, 0.3) !important;
        font-size: 15px !important;
    }

    /* Send button - Round, no glow */
    .ce-chat-send-btn {
        min-width: 34px !important;
        min-height: 34px !important;
        width: 34px !important;
        height: 34px !important;
        border-radius: 50% !important;
        background: #ffffff !important;
        border: none !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        transition: all 0.2s ease !important;
        -webkit-tap-highlight-color: transparent !important;
        touch-action: manipulation !important;
        flex-shrink: 0 !important;
        box-shadow: none !important;
    }

    .ce-chat-send-btn::after {
        display: none !important;
    }

    .ce-chat-send-btn:hover {
        box-shadow: none !important;
    }

    .ce-chat-send-btn:active {
        transform: scale(0.9) !important;
    }

    .ce-chat-send-btn svg {
        width: 16px !important;
        height: 16px !important;
        stroke: #000000 !important;
        stroke-width: 2.5 !important;
    }

    /* Scroll to bottom */
    .ce-scroll-to-bottom {
        position: fixed !important;
        bottom: calc(130px + env(safe-area-inset-bottom, 0px)) !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        min-width: 40px !important;
        min-height: 40px !important;
        width: 40px !important;
        height: 40px !important;
        border-radius: 50% !important;
        background: rgba(25, 22, 42, 0.95) !important;
        backdrop-filter: blur(8px) !important;
        border: 1px solid rgba(255, 255, 255, 0.1) !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        cursor: pointer !important;
        z-index: 600 !important;
        opacity: 0 !important;
        pointer-events: none !important;
        transition: all 0.3s ease !important;
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.4) !important;
        touch-action: manipulation !important;
        -webkit-tap-highlight-color: transparent !important;
    }

    .ce-scroll-to-bottom.visible {
        opacity: 1 !important;
        pointer-events: auto !important;
    }

    .ce-scroll-to-bottom:active {
        transform: translateX(-50%) scale(0.9) !important;
    }

    .ce-scroll-to-bottom svg {
        width: 18px !important;
        height: 18px !important;
        stroke: rgba(255, 255, 255, 0.8) !important;
        stroke-width: 2.5 !important;
    }

    .ce-autres-nav {
        display: none;
    }

    /* Autres annonces - scroll horizontal */
    .ce-chat-annonces.autres {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        grid-template-columns: none !important;
        overflow-x: auto !important;
        overflow-y: visible !important;
        gap: 10px !important;
        height: auto !important;
        min-height: 0 !important;
        padding-bottom: 10px !important;
    }

    .ce-chat-annonces.autres .ce-chat-card {
        flex: 0 0 170px !important;
        min-width: 170px !important;
        max-width: 170px !important;
        height: auto !important;
        display: flex !important;
        flex-direction: column !important;
    }

    .ce-chat-annonces.autres .ce-chat-card-image {
        height: 95px !important;
        min-height: 95px !important;
        display: block !important;
    }

    .ce-chat-annonces.autres .ce-chat-card-body {
        display: flex !important;
        flex-direction: column !important;
        padding: 10px !important;
        flex: 1 !important;
        gap: 6px !important;
    }

    .ce-chat-annonces.autres .ce-card-specs-grid {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 3px 6px !important;
        padding: 4px 6px !important;
    }

    .ce-chat-annonces.autres .ce-card-spec-value {
        font-size: 9px !important;
    }

    .ce-chat-annonces.autres .ce-card-spec-icon {
        width: 10px !important;
        height: 10px !important;
    }

    .ce-chat-annonces.autres .ce-card-footer {
        padding-top: 6px !important;
        margin-top: auto !important;
        gap: 6px !important;
    }

    .ce-chat-annonces.autres .ce-card-action-btn {
        width: 30px !important;
        height: 30px !important;
        min-width: 30px !important;
        min-height: 30px !important;
    }

    .ce-chat-annonces.autres .ce-card-action-btn svg {
        width: 13px !important;
        height: 13px !important;
    }

    .ce-chat-annonces.autres .ce-platform-label {
        font-size: 7px !important;
    }

    .ce-chat-annonces.autres .ce-platform-name {
        font-size: 9px !important;
    }

    .ce-chat-annonces.autres .ce-platform-logo {
        width: 12px !important;
        height: 12px !important;
    }

    /* Titre section autres pistes */
    .ce-autres-title {
        font-size: 13px !important;
        margin-bottom: 10px !important;
    }
}

@media (max-width: 400px) {
    .ce-chat-wrapper {
        padding-left: 14px !important;
        padding-right: 14px !important;
    }

    .ce-chat-annonces:not(.autres) .ce-chat-card-image {
        width: 100px !important;
        min-width: 100px !important;
    }

    .ce-message-assistant-content {
        font-size: 14px;
    }

    .ce-message-user {
        font-size: 14px !important;
        max-width: 88% !important;
    }

    .ce-chat-annonces.autres .ce-chat-card {
        flex: 0 0 155px !important;
        min-width: 155px !important;
        max-width: 155px !important;
    }
}

/* ========== LOADING CHAT ========== */
.ce-loading-chat {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: var(--text-secondary);
    font-size: 16px;
}

.ce-loading-chat::before {
    content: '';
    width: 22px;
    height: 22px;
    border: 2px solid var(--accent-light);
    border-top-color: var(--accent);
    border-radius: 50%;
    margin-right: 14px;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ========== RETRY BUTTON ========== */
.ce-message-retry {
    display: flex;
    justify-content: flex-end;
    margin-top: 10px;
    margin-bottom: 20px;
}

.ce-retry-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 11px 18px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-full);
    color: rgba(255, 255, 255, 0.8);
    font-family: var(--font-chat);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ce-retry-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.ce-retry-btn svg {
    width: 16px;
    height: 16px;
    stroke: rgba(255, 255, 255, 0.7);
}

.ce-retry-btn:hover svg {
    animation: spin 0.8s linear;
}

/* ═══════════════════════════════════════════════════════════════
   MODE ORION EXPERT - Design Futuriste Premium
   Layout: 2 colonnes (Alertes | Suggestions)
   Style: Cyber-automotive élégant, sans glow excessif
   ═══════════════════════════════════════════════════════════════ */

/* Container principal */
.orion-expert {
    align-self: flex-start;
    margin: 28px 0;
    padding: 0;
    width: 100%;
    max-width: 100%;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Bloc principal - Design futuriste épuré */
.orion-expert-bubble {
    position: relative;
    background: rgba(15, 13, 25, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 0;
    overflow: hidden;
}

/* Subtle top line */
.orion-expert-bubble::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
}

/* No grid effect */
.orion-expert-bubble::after {
    display: none;
}

/* Header futuriste */
.orion-expert-header {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 22px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    background: transparent;
}

/* Icône - design épuré */
.orion-expert-icon {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
    /* PAS de box-shadow/glow */
}

/* Bordure intérieure subtile */
.orion-expert-icon::before {
    content: '';
    position: absolute;
    inset: 1px;
    border-radius: 9px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    pointer-events: none;
}

.orion-expert-icon svg {
    width: 20px;
    height: 20px;
    stroke: white;
    fill: none;
    stroke-width: 2;
}

/* Titre - Style tech moderne */
.orion-expert-title {
    font-size: 13px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Badge "EXPERT" */
.orion-expert-title::after {
    content: 'EXPERT';
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 1px;
    padding: 3px 8px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    color: rgba(255, 255, 255, 0.7);
}

/* Contenu principal */
.orion-expert-content {
    position: relative;
    z-index: 1;
    padding: 20px 22px;
}

/* Layout 2 colonnes */
.orion-expert-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

/* Colonnes */
.orion-expert-col {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Titre de colonne - EN BLANC */
.orion-expert-col-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    font-weight: 700;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.orion-col-icon {
    font-size: 13px;
    opacity: 0.9;
}

/* === ALERTES (colonne gauche) === */
.orion-expert-alert {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 12px;
    transition: all 0.25s ease;
    border-left: 3px solid transparent;
    background: rgba(255, 255, 255, 0.02);
}

.orion-expert-alert:hover {
    background: rgba(255, 255, 255, 0.04);
    transform: translateX(2px);
}

.orion-alert-icon {
    font-size: 16px;
    line-height: 1;
    flex-shrink: 0;
    margin-top: 1px;
}

.orion-alert-content {
    flex: 1;
    min-width: 0;
}

.orion-alert-title {
    font-size: 13px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.4;
    margin-bottom: 4px;
}

.orion-alert-msg {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.55;
}

/* Niveaux d'alerte - Design raffiné */
.orion-expert-alert.warning {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.1) 0%, rgba(251, 191, 36, 0.05) 100%);
    border-left-color: #fbbf24;
}

.orion-expert-alert.warning .orion-alert-title {
    color: #fde68a;
}

.orion-expert-alert.conseil {
    background: linear-gradient(135deg, rgba(96, 165, 250, 0.1) 0%, rgba(96, 165, 250, 0.05) 100%);
    border-left-color: #60a5fa;
}

.orion-expert-alert.conseil .orion-alert-title {
    color: #93c5fd;
}

.orion-expert-alert.info {
    background: linear-gradient(135deg, rgba(148, 163, 184, 0.08) 0%, rgba(148, 163, 184, 0.04) 100%);
    border-left-color: #94a3b8;
}

.orion-expert-alert.positif {
    background: linear-gradient(135deg, rgba(74, 222, 128, 0.1) 0%, rgba(74, 222, 128, 0.05) 100%);
    border-left-color: #4ade80;
}

.orion-expert-alert.positif .orion-alert-title {
    color: #86efac;
}

/* === SUGGESTIONS (colonne droite) === */
.orion-suggestion {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(74, 222, 128, 0.08) 0%, rgba(34, 197, 94, 0.04) 100%);
    border: 1px solid rgba(74, 222, 128, 0.15);
    cursor: pointer;
    transition: all 0.25s ease;
}

.orion-suggestion:hover {
    background: linear-gradient(135deg, rgba(74, 222, 128, 0.15) 0%, rgba(34, 197, 94, 0.08) 100%);
    border-color: rgba(74, 222, 128, 0.35);
    transform: translateX(4px);
}

.orion-suggestion-icon {
    font-size: 15px;
    line-height: 1;
    flex-shrink: 0;
    margin-top: 1px;
}

.orion-suggestion-content {
    flex: 1;
    min-width: 0;
}

.orion-suggestion-name {
    font-size: 13px;
    font-weight: 700;
    color: #4ade80;
    line-height: 1.4;
    margin-bottom: 3px;
}

.orion-suggestion-reason {
    font-size: 11.5px;
    color: rgba(255, 255, 255, 0.55);
    line-height: 1.45;
}

/* Responsive */
@media (max-width: 768px) {
    .orion-expert {
        margin: 22px 0;
    }

    .orion-expert-bubble {
        border-radius: 16px;
    }

    .orion-expert-header {
        padding: 14px 16px;
        gap: 12px;
    }

    .orion-expert-icon {
        width: 32px;
        height: 32px;
        border-radius: 8px;
    }

    .orion-expert-icon svg {
        width: 18px;
        height: 18px;
    }

    .orion-expert-title {
        font-size: 11px;
        letter-spacing: 2px;
    }

    .orion-expert-title::after {
        font-size: 8px;
        padding: 2px 6px;
    }

    .orion-expert-content {
        padding: 16px;
    }

    /* Colonnes empilées sur mobile */
    .orion-expert-layout {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .orion-expert-col-title {
        font-size: 10px;
        letter-spacing: 1px;
    }

    .orion-expert-alert,
    .orion-suggestion {
        padding: 10px 12px;
        border-radius: 10px;
    }

    .orion-alert-title,
    .orion-suggestion-name {
        font-size: 12px;
    }

    .orion-alert-msg,
    .orion-suggestion-reason {
        font-size: 11px;
    }
}

/* ========== COMPTEUR D'ANNONCES ========== */
.ce-annonces-counter {
    display: none;
    align-items: center;
    gap: 8px;
    justify-content: center;
    padding: 6px 16px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 10px;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.ce-annonces-counter.visible {
    display: flex;
    opacity: 1;
    transform: translateY(0);
}

.ce-annonces-counter svg {
    opacity: 0.7;
}

/* ========== PREMIER MESSAGE IA - GLASSMORPHISM ========== */
.ce-message-assistant:first-child .ce-message-assistant-content {
    background: rgba(22, 18, 35, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 24px 28px;
    box-shadow: none;
}


/* ========== MATCH POPUP — DA Vert/Jaune ========== */
.ce-match-popup {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 9999;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
}
.ce-match-popup.open {
    opacity: 1;
    pointer-events: all;
}

/* Overlay */
.ce-match-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

/* Sheet */
.ce-match-sheet {
    position: relative;
    width: 100%;
    max-width: 1100px;
    height: 90vh;
    display: flex;
    flex-direction: column;
    border-radius: 24px 24px 0 0;
    background: linear-gradient(175deg,
        rgba(18, 25, 18, 0.97) 0%,
        rgba(14, 20, 14, 0.98) 50%,
        rgba(10, 15, 10, 0.99) 100%);
    border: 1px solid rgba(74, 222, 128, 0.12);
    border-bottom: none;
    box-shadow:
        0 -8px 48px rgba(0, 0, 0, 0.5),
        0 -2px 20px rgba(74, 222, 128, 0.06),
        inset 0 1px 0 rgba(74, 222, 128, 0.08);
    transform: translateY(100%);
    transition: transform 0.5s cubic-bezier(0.32, 0.72, 0, 1);
    overflow: hidden;
}
.ce-match-popup.open .ce-match-sheet {
    transform: translateY(0);
}

/* Handle pill */
.ce-match-handle {
    width: 40px;
    height: 4px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 2px;
    margin: 10px auto 0;
    flex-shrink: 0;
}

/* Header */
.ce-match-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    border-bottom: 1px solid rgba(74, 222, 128, 0.1);
    flex-shrink: 0;
    background: linear-gradient(90deg, rgba(74, 222, 128, 0.04) 0%, rgba(250, 204, 21, 0.03) 100%);
}
.ce-match-header-info {
    display: flex;
    align-items: center;
    gap: 14px;
}
.ce-match-logo {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: linear-gradient(135deg, #4ade80 0%, #facc15 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}
.ce-match-logo svg {
    width: 22px;
    height: 22px;
    stroke: #0f1a0f;
    fill: none;
}
.ce-match-header h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 800;
    background: linear-gradient(135deg, #4ade80 0%, #facc15 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
}
.ce-match-count {
    display: block;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
    font-weight: 400;
    margin-top: 1px;
}
.ce-match-close {
    width: 36px;
    height: 36px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.5);
    transition: all 0.2s ease;
}
.ce-match-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}
.ce-match-close svg { width: 16px; height: 16px; }

/* Grid */
.ce-match-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    padding: 20px 24px;
    overflow-y: auto;
    flex: 1;
    align-content: start;
    scrollbar-width: thin;
    scrollbar-color: rgba(74, 222, 128, 0.2) transparent;
}
.ce-match-grid::-webkit-scrollbar { width: 5px; }
.ce-match-grid::-webkit-scrollbar-track { background: transparent; }
.ce-match-grid::-webkit-scrollbar-thumb {
    background: rgba(74, 222, 128, 0.2);
    border-radius: 3px;
}

/* ========== MATCH CARD (.ce-mcard) — Dedicated popup card ========== */
.ce-mcard {
    background: linear-gradient(145deg, rgba(22, 30, 22, 0.95) 0%, rgba(14, 20, 14, 0.98) 100%);
    border: 1px solid rgba(74, 222, 128, 0.1);
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: matchCardIn 0.4s cubic-bezier(0.4, 0, 0.2, 1) both;
}
.ce-mcard:hover {
    border-color: rgba(74, 222, 128, 0.25);
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3), 0 0 16px rgba(74, 222, 128, 0.06);
}

/* Card image */
.ce-mcard-img {
    height: 140px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    flex-shrink: 0;
    background: #0a0f0a;
}
.ce-mcard-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.ce-mcard:hover .ce-mcard-img img {
    transform: scale(1.05);
}

/* Card body */
.ce-mcard-body {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}
.ce-mcard-top {
    cursor: pointer;
}
.ce-mcard-title {
    margin: 0;
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    line-height: 1.3;
}
.ce-mcard-finition {
    margin: 2px 0 0;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.4);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.ce-mcard-price {
    margin: 4px 0 0;
    font-size: 16px;
    font-weight: 800;
    background: linear-gradient(135deg, #4ade80, #facc15);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Specs row */
.ce-mcard-specs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px 8px;
}
.ce-mcard-specs span {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
    padding: 3px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Action buttons */
.ce-mcard-actions {
    display: flex;
    gap: 8px;
    padding-top: 4px;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    margin-top: auto;
}
.ce-mcard-btn {
    flex: 1;
    height: 34px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}
.ce-mcard-btn svg { width: 16px; height: 16px; }

.ce-mcard-dislike {
    color: rgba(255, 100, 100, 0.6);
}
.ce-mcard-dislike:hover {
    background: rgba(255, 100, 100, 0.1);
    border-color: rgba(255, 100, 100, 0.3);
    color: #ff6464;
}
.ce-mcard-like {
    color: rgba(74, 222, 128, 0.7);
}
.ce-mcard-like:hover {
    background: rgba(74, 222, 128, 0.1);
    border-color: rgba(74, 222, 128, 0.3);
    color: #4ade80;
}
.ce-mcard-like.liked {
    background: linear-gradient(135deg, #4ade80, #facc15);
    border-color: transparent;
    color: #0f1a0f;
}
.ce-mcard-like.liked svg { fill: #0f1a0f; stroke: #0f1a0f; }
.ce-mcard-view {
    color: rgba(255, 255, 255, 0.4);
    text-decoration: none;
}
.ce-mcard-view:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
    color: #fff;
}

@keyframes matchCardIn {
    from { opacity: 0; transform: translateY(14px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Loading */
.ce-match-loading {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 60px 0;
    color: rgba(255, 255, 255, 0.35);
    font-size: 13px;
}
.ce-match-spinner {
    width: 28px;
    height: 28px;
    border: 2px solid rgba(74, 222, 128, 0.15);
    border-top-color: #4ade80;
    border-radius: 50%;
    animation: matchSpin 0.8s linear infinite;
}
@keyframes matchSpin { to { transform: rotate(360deg); } }

.ce-match-empty {
    grid-column: 1 / -1;
    text-align: center;
    color: rgba(255, 255, 255, 0.35);
    padding: 60px 20px;
    font-size: 14px;
    margin: 0;
}

/* Match popup responsive */
@media (max-width: 900px) {
    .ce-match-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        padding: 16px;
    }
}
@media (max-width: 600px) {
    .ce-match-sheet {
        max-width: 100%;
        height: 95vh;
        border-radius: 20px 20px 0 0;
    }
    .ce-match-grid {
        grid-template-columns: 1fr;
        padding: 12px;
        gap: 12px;
    }
    .ce-match-header { padding: 14px 16px; }
    .ce-mcard-img { height: 180px; }
}

/* ========== FINAL OVERRIDE: Autres pistes mobile ========== */
@media (max-width: 768px) {
    .ce-chat-annonces.autres {
        -webkit-overflow-scrolling: touch !important;
        max-height: none !important;
    }

    .ce-chat-annonces.autres > .ce-chat-card {
        flex: 0 0 170px !important;
        min-width: 170px !important;
        max-width: 170px !important;
        width: 170px !important;
        height: auto !important;
        max-height: none !important;
        display: flex !important;
        flex-direction: column !important;
    }

    .ce-chat-annonces.autres > .ce-chat-card > .ce-chat-card-image {
        height: 95px !important;
        min-height: 95px !important;
        display: block !important;
    }

    .ce-chat-annonces.autres > .ce-chat-card > .ce-chat-card-body {
        display: flex !important;
        flex-direction: column !important;
        padding: 10px !important;
        flex: 1 !important;
    }
}
