/* ========================================================
   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 Violet */
    --accent: #D285FF;
    --accent-hover: #c066f7;
    --accent-glow: rgba(210, 133, 255, 0.25);
    --accent-light: rgba(210, 133, 255, 0.12);

    /* 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) {
    /* Header mobile fixe en haut */
    .ce-mobile-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        height: 56px;
        padding: 0 16px;
        background: rgba(14, 14, 24, 0.95);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
        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: 40px;
        height: 40px;
        border-radius: 12px;
        background: transparent;
        border: none;
        color: rgba(255, 255, 255, 0.9);
        cursor: pointer;
        transition: all 0.2s ease;
        -webkit-tap-highlight-color: transparent;
    }

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

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

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

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

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

    /* Version badge caché sur mobile */
    .ce-version-badge {
        display: none !important;
    }

    /* Options trigger caché sur mobile (on utilise le bouton du header) */
    .ce-options-trigger {
        display: none !important;
    }

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

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

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

    /* Version badge caché */
    .ce-version-badge {
        display: none !important;
    }

    /* Header mobile: 56px fixe en haut */
    .ce-mobile-header {
        height: 56px;
    }

    /* Messages utilisateur: alignés à droite avec bords arrondis */
    .ce-message-user {
        align-self: flex-end !important;
        max-width: 80% !important;
        background: rgba(35, 28, 60, 0.95) !important;
        border: 1px solid rgba(120, 100, 180, 0.2) !important;
        padding: 12px 16px !important;
        border-radius: 18px 18px 4px 18px !important;
        margin: 0 !important;
        font-size: 15px !important;
        line-height: 1.5 !important;
        word-wrap: break-word !important;
    }

    /* Zone scrollable: entre header et input */
    .ce-chat-wrapper {
        flex: 1;
        overflow-y: auto;
        overflow-x: hidden;
        position: relative;
        -webkit-overflow-scrolling: touch;
        padding: 72px 16px 0 16px;
        margin-bottom: 140px; /* Espace pour footer: suggestions (40px) + input (48px) + padding (20px) + safe-area (20px max) */
    }

    /* Gradient fade en haut (subtil) */
    .ce-chat-wrapper::before {
        content: '';
        position: fixed;
        top: 56px;
        left: 0;
        right: 0;
        height: 16px;
        background: linear-gradient(180deg, rgba(18, 16, 28, 1) 0%, rgba(18, 16, 28, 0) 100%);
        pointer-events: none;
        z-index: 90;
    }

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

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

    /* Messages assistant normaux: transparent (sauf le premier qui garde son glassmorphism) */
    .ce-message-assistant:not(:first-child) .ce-message-assistant-content {
        background: transparent !important;
        border: none !important;
        padding: 0 !important;
        padding-left: 4px !important;
        padding-right: 12px !important;
        font-size: 15px !important;
        line-height: 1.6 !important;
    }

    /* Premier message AI: garde son design glassmorphism sur mobile */
    .ce-message-assistant:first-child .ce-message-assistant-content {
        padding: 18px 20px !important;
        border-radius: 16px !important;
        margin-right: 12px !important;
    }

    /* Footer input: fixe en bas avec safe-area pour iPhone */
    .ce-chat-footer {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 500;
        background: #12101c;
        padding: 8px 16px;
        padding-bottom: max(8px, env(safe-area-inset-bottom));
        border-top: 1px solid rgba(255, 255, 255, 0.04);
    }

    /* Bouton scroll to bottom - Touch-friendly */
    .ce-scroll-to-bottom {
        position: fixed;
        bottom: calc(140px + env(safe-area-inset-bottom, 0px));
        left: 50%;
        transform: translateX(-50%);
        min-width: 44px;
        min-height: 44px;
        width: 44px;
        height: 44px;
        border-radius: 50%;
        background: rgba(30, 25, 50, 0.95);
        backdrop-filter: blur(8px);
        border: 1px solid rgba(255, 255, 255, 0.12);
        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 4px 16px 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.88);
    }

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

    /* Suggestions mobile - Ultra compactes */
    .ce-chat-suggestions {
        display: flex;
        gap: 6px;
        overflow-x: auto;
        padding-bottom: 4px;
        margin-bottom: 4px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

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

    /* Input bar mobile - Propre et compact */
    .ce-chat-input-bar {
        display: flex;
        align-items: center;
        gap: 8px;
        background: transparent;
        border: none;
        border-radius: 0;
        padding: 0;
    }

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

    .ce-chat-input:focus {
        outline: 2px solid rgba(139, 92, 246, 0.4);
        outline-offset: 2px;
        border-radius: 4px;
    }

    .ce-chat-input::placeholder {
        color: rgba(255, 255, 255, 0.4);
        text-align: left;
    }

    .ce-chat-send-btn {
        min-width: 44px;
        min-height: 44px;
        width: 44px;
        height: 44px;
        border-radius: 12px;
        background: linear-gradient(135deg, rgba(139, 92, 246, 0.95) 0%, rgba(99, 102, 241, 0.95) 100%);
        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;
    }

    .ce-chat-send-btn:active {
        transform: scale(0.92);
        background: linear-gradient(135deg, rgba(139, 92, 246, 1) 0%, rgba(99, 102, 241, 1) 100%);
    }

    .ce-chat-send-btn svg {
        width: 20px;
        height: 20px;
        stroke: white;
        stroke-width: 2;
    }

    /* Suggestions sans background - Compactes */
    .ce-chat-suggestion {
        flex-shrink: 0;
        padding: 6px 12px;
        background: transparent;
        border: 1px solid rgba(255, 255, 255, 0.12);
        border-radius: 14px;
        color: rgba(255, 255, 255, 0.85);
        font-size: 13px;
        font-weight: 450;
        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.05);
        border-color: rgba(255, 255, 255, 0.2);
    }

    /* Cartes d'annonces mobile - Améliorées */
    .ce-chat-annonces {
        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;
    }

    /* Version badge caché sur mobile */
    .ce-version-badge {
        display: none !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;
}

.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;
}

/* 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;
}

/* ========== TYPING INDICATOR ========== */
.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;
}

/* ========== 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;
}

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

.ce-chat-card:hover {
    border-color: rgba(210, 133, 255, 0.25);
    transform: translateY(-8px);
    box-shadow: 0 16px 48px rgba(210, 133, 255, 0.15), 0 8px 24px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(210, 133, 255, 0.08);
}

.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;
}

/* 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 */
.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: 2px;
}

/* 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 plateforme dans le footer */
.ce-card-platform-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.3px;
    color: #ffffff;
    border: none;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    opacity: 0.7;
}

/* La Centrale - Rouge */
.ce-platform-lacentrale {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
}

/* ParuVendu - Dégradé noir vers rouge */
.ce-platform-paruvendu {
    background: linear-gradient(135deg, #1a1a1a, #dc2626);
}

/* Leboncoin - Orange */
.ce-platform-leboncoin {
    background: linear-gradient(135deg, #ff6600, #ff8533);
}

/* Auto-Selection - Bleu */
.ce-platform-autoselection {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
}

/* Transakauto - Rose */
.ce-platform-transakauto {
    background: linear-gradient(135deg, #ec4899, #db2777);
}

/* Ouest-France - Rouge foncé */
.ce-platform-ouestfrance {
    background: linear-gradient(135deg, #991b1b, #7f1d1d);
}

/* 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 */
.ce-dislike-btn {
    border-color: rgba(239, 68, 68, 0.3);
}

.ce-dislike-btn svg {
    stroke: #ef4444;
}

.ce-dislike-btn:hover {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.6);
    transform: scale(1.1) rotate(-10deg);
}

.ce-dislike-btn:hover svg {
    stroke: #ff5555;
}

/* Like Button */
.ce-like-btn {
    border-color: rgba(74, 222, 128, 0.3);
}

.ce-like-btn svg {
    stroke: #4ade80;
}

.ce-like-btn:hover {
    background: rgba(74, 222, 128, 0.15);
    border-color: rgba(74, 222, 128, 0.6);
    transform: scale(1.1);
}

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

/* Like Button - État liked */
.ce-like-btn.liked {
    background: linear-gradient(135deg, #4ade80, #facc15);
    border-color: transparent;
}

.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 (vert/jaune) */
@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(74, 222, 128, 0.95), rgba(250, 204, 21, 0.95));
}

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

/* Animation Dislike (rouge/rose) */
@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(239, 68, 68, 0.95), rgba(244, 114, 182, 0.95));
}

.ce-chat-card.swiping-dislike .ce-card-swipe-text {
    color: #ffffff;
    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(210, 133, 255, 0.2);
    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;
    animation: pulse-auth 2s ease-in-out infinite;
}

@keyframes pulse-auth {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.4);
    }
    50% {
        box-shadow: 0 0 20px 8px rgba(74, 222, 128, 0);
    }
}

.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);
}

/* 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 {
    position: relative;
    margin: 0 -8px;
    padding: 0 8px;
}

/* Scroll horizontal */
.ce-chat-annonces.autres {
    display: flex !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(210, 133, 255, 0.3) 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(210, 133, 255, 0.3);
    border-radius: 4px;
}

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

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

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

.ce-chat-annonces.autres .ce-chat-card-body {
    padding: 12px;
    gap: 8px;
}

.ce-chat-annonces.autres .ce-chat-card-title {
    font-size: 14px;
}

.ce-chat-annonces.autres .ce-chat-card-price {
    font-size: 16px;
}

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

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

/* Boutons fleches de navigation */
.ce-autres-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 38px;
    height: 38px;
    background: var(--bg-card);
    border: 1px solid var(--border-hover);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.2s ease;
    color: #fff;
}

.ce-autres-nav:hover {
    background: var(--accent);
    border-color: var(--accent);
}

.ce-autres-nav.prev { left: -19px; }
.ce-autres-nav.next { right: -19px; }
.ce-autres-nav svg { width: 18px; height: 18px; }
.ce-autres-nav.hidden { opacity: 0; pointer-events: none; }

/* ========== MODELES SUGGERES ========== */
.ce-modeles-suggeres {
    margin-top: 24px;
    padding: 18px 22px;
    background: var(--accent-light);
    border: 1px solid rgba(210, 133, 255, 0.2);
    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: linear-gradient(180deg, var(--accent) 0%, #9D4EDD 100%);
}

.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 */
.ce-options-trigger {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 50;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ce-options-trigger:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
    color: var(--text-main);
}

.ce-options-trigger svg {
    opacity: 0.7;
}

.ce-options-trigger:hover svg {
    opacity: 1;
}

.ce-criteria-count {
    display: none;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: var(--accent);
    border-radius: 9px;
    font-size: 11px;
    font-weight: 600;
    color: #fff;
    text-align: center;
    line-height: 18px;
}

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

/* 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(210, 133, 255, 0.12);
    border-color: rgba(210, 133, 255, 0.4);
    color: var(--accent);
}

.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(210, 133, 255, 0.15);
    border-color: rgba(210, 133, 255, 0.5);
    color: var(--accent);
    box-shadow: 0 0 12px rgba(210, 133, 255, 0.2);
}

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

/* ========== 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 ========== */
.ce-options-trigger {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 50;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: linear-gradient(145deg, rgba(28, 22, 50, 0.9) 0%, rgba(18, 14, 35, 0.95) 100%);
    border: 1px solid rgba(210, 133, 255, 0.15);
    border-radius: 10px;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.ce-options-trigger:hover {
    background: linear-gradient(145deg, rgba(35, 28, 60, 0.95) 0%, rgba(25, 20, 45, 0.98) 100%);
    border-color: rgba(210, 133, 255, 0.4);
    color: var(--text-main);
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.4), 0 0 20px rgba(210, 133, 255, 0.1);
}

.ce-options-trigger svg {
    opacity: 0.7;
    transition: all 0.2s;
    color: var(--accent);
}

.ce-options-trigger:hover svg {
    opacity: 1;
    transform: rotate(15deg);
}

/* Badge with animation */
.ce-criteria-count {
    display: none;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background: linear-gradient(135deg, var(--accent) 0%, #9D4EDD 100%);
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    text-align: center;
    line-height: 20px;
    animation: pulse 2s ease-in-out infinite;
}

.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.08);
    background: linear-gradient(180deg, rgba(210, 133, 255, 0.04) 0%, transparent 100%);
}

.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: linear-gradient(180deg, var(--accent) 0%, #9D4EDD 100%);
    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 {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(210, 133, 255, 0.1) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.3s;
}

.ce-mode-option:hover::before {
    opacity: 1;
}

.ce-mode-option.active {
    background: linear-gradient(135deg, rgba(210, 133, 255, 0.15) 0%, rgba(157, 78, 221, 0.1) 100%);
    border-color: rgba(210, 133, 255, 0.5);
    color: var(--accent);
    box-shadow: 0 0 20px rgba(210, 133, 255, 0.15);
}

.ce-mode-option.active::before {
    opacity: 1;
}

/* Orion Expert Info Section */
.ce-orion-info {
    background: linear-gradient(135deg, rgba(210, 133, 255, 0.08) 0%, rgba(157, 78, 221, 0.04) 100%);
    border: 1px solid rgba(210, 133, 255, 0.2);
    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: linear-gradient(135deg, rgba(210, 133, 255, 0.2) 0%, rgba(157, 78, 221, 0.15) 100%);
    border-radius: 6px;
    animation: pulse-orion 2s ease-in-out infinite;
}

.ce-orion-info-icon svg {
    color: var(--accent);
}

@keyframes pulse-orion {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(210, 133, 255, 0.4);
    }
    50% {
        box-shadow: 0 0 15px 5px rgba(210, 133, 255, 0);
    }
}

.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(210, 133, 255, 0.3);
}

.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: linear-gradient(135deg, rgba(210, 133, 255, 0.08) 0%, rgba(157, 78, 221, 0.04) 100%);
    border: 1px solid rgba(210, 133, 255, 0.2);
    border-radius: 10px;
    font-size: 12px;
    color: var(--text-main);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.ce-criteria-chip:hover {
    background: linear-gradient(135deg, rgba(210, 133, 255, 0.12) 0%, rgba(157, 78, 221, 0.08) 100%);
    border-color: rgba(210, 133, 255, 0.4);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(210, 133, 255, 0.1);
}

.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;
    }
}

/* ========== 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;
}

/* Animation du dégradé de bordure */
@keyframes borderGlow {
    0%, 100% {
        border-color: rgba(210, 133, 255, 0.4);
        box-shadow: 0 0 8px rgba(210, 133, 255, 0.15);
    }
    50% {
        border-color: rgba(138, 43, 226, 0.5);
        box-shadow: 0 0 12px rgba(138, 43, 226, 0.2);
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% center;
    }
    100% {
        background-position: 200% center;
    }
}

.ce-chat-suggestion {
    position: relative;
    background: linear-gradient(145deg, rgba(28, 22, 50, 0.9) 0%, rgba(20, 16, 40, 0.95) 100%);
    border: 1px solid rgba(120, 100, 180, 0.25);
    border-radius: var(--radius-full);
    padding: 12px 20px;
    color: var(--text-main);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
    white-space: nowrap;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

/* Effet shimmer subtil */
.ce-chat-suggestion::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: var(--radius-full);
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(210, 133, 255, 0.06) 50%,
        transparent 100%
    );
    background-size: 200% 100%;
    animation: shimmer 5s ease-in-out infinite;
    pointer-events: none;
}

.ce-chat-suggestion:hover {
    background: linear-gradient(145deg, rgba(38, 30, 65, 0.95) 0%, rgba(28, 22, 55, 0.98) 100%);
    border-color: rgba(210, 133, 255, 0.5);
    transform: translateY(-3px);
    box-shadow:
        0 8px 24px rgba(0, 0, 0, 0.4),
        0 0 20px rgba(210, 133, 255, 0.1),
        0 0 0 1px rgba(210, 133, 255, 0.15);
}

.ce-chat-suggestion:active {
    transform: translateY(-1px) scale(0.98);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* Variante pour les suggestions "combo" (plus importantes) */
.ce-chat-suggestion[data-index="0"],
.ce-chat-suggestion[data-index="1"],
.ce-chat-suggestion[data-index="2"] {
    background: linear-gradient(145deg, rgba(35, 28, 60, 0.95) 0%, rgba(25, 20, 50, 0.98) 100%);
    border-color: rgba(210, 133, 255, 0.35);
}

/* 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: 58px;
    background: linear-gradient(145deg, rgba(24, 20, 44, 0.95) 0%, rgba(18, 14, 35, 0.98) 100%);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(120, 100, 180, 0.18);
    border-radius: var(--radius-full);
    padding: 4px 4px 4px 24px;
    max-width: 860px;
    margin: 0 auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(210, 133, 255, 0.04);
    transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.ce-chat-input-bar:focus-within {
    border-color: rgba(210, 133, 255, 0.6);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 0 3px rgba(210, 133, 255, 0.2), 0 0 60px rgba(210, 133, 255, 0.12);
    background: linear-gradient(145deg, rgba(28, 24, 50, 0.98) 0%, rgba(20, 16, 38, 0.99) 100%);
    animation: inputGlow 2s ease-in-out infinite alternate;
}

@keyframes inputGlow {
    0% { box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 0 3px rgba(210, 133, 255, 0.2), 0 0 60px rgba(210, 133, 255, 0.12); }
    100% { box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 0 3px rgba(210, 133, 255, 0.25), 0 0 80px rgba(210, 133, 255, 0.18); }
}

.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: 50px;
    height: 50px;
    min-width: 50px;
    background: linear-gradient(135deg, var(--accent) 0%, #a855f7 100%);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(210, 133, 255, 0.25);
    position: relative;
    overflow: hidden;
}

/* Shine sweep on send button */
.ce-chat-send-btn::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -100%;
    width: 50%;
    height: 200%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transform: skewX(-20deg);
    transition: left 0.5s ease;
}

.ce-chat-send-btn:hover::after {
    left: 150%;
}

.ce-chat-send-btn:hover {
    background: linear-gradient(135deg, var(--accent-hover) 0%, #9333ea 100%);
    transform: scale(1.08);
    box-shadow: 0 6px 20px rgba(210, 133, 255, 0.35);
}

.ce-chat-send-btn:disabled {
    background: var(--text-muted);
    cursor: not-allowed;
    opacity: 0.5;
    box-shadow: none;
}

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

.ce-chat-send-btn svg {
    width: 22px;
    height: 22px;
}

/* ========== 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) {
    /* Container avec scroll fluide (ChatGPT style) */
    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: 20px 12px;
        padding-bottom: 180px;
        will-change: scroll-position;
    }

    /* Zone scrollable: entre header et input */
    .ce-chat-wrapper {
        flex: 1 !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        position: relative !important;
        -webkit-overflow-scrolling: touch !important;
        padding: 72px 16px 0 16px !important;
        margin-bottom: 140px !important;
    }

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

    /* Messages avec animations fluides */
    .ce-messages {
        gap: 20px;
        will-change: transform;
    }

    .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(12px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    /* Footer mobile optimisé (ChatGPT style) */
    .ce-chat-footer {
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        padding: 8px 16px !important;
        padding-bottom: max(8px, env(safe-area-inset-bottom)) !important;
        background: #12101c !important;
        backdrop-filter: none !important;
        border-top: 1px solid rgba(255, 255, 255, 0.04) !important;
        z-index: 500 !important;
    }

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

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

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

    /* Cartes optimisées mobile (ChatGPT style) - SAUF les "autres" qui sont horizontales */
    .ce-chat-annonces:not(.autres) {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }

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

    .ce-chat-card:active {
        transform: scale(0.98);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }

    .ce-chat-card-image {
        height: 220px;
        border-radius: 16px 16px 0 0;
    }

    .ce-chat-card-body {
        padding: 16px;
        background: rgba(22, 18, 40, 0.98);
    }

    .ce-chat-card-title {
        font-size: 17px;
        font-weight: 600;
        line-height: 1.4;
    }

    .ce-chat-card-finition {
        font-size: 14px;
        margin-top: 4px;
    }

    .ce-chat-card-price {
        font-size: 20px;
        font-weight: 700;
        margin-top: 12px;
    }

    /* Boutons d'action plus touchables */
    .ce-card-action-btn {
        width: 48px;
        height: 48px;
        min-width: 48px;
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
    }

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

    .ce-card-specs-grid {
        gap: 10px 16px;
        padding: 12px 14px;
    }

    .ce-card-spec {
        font-size: 14px;
    }

    .ce-card-spec-icon {
        width: 16px;
        height: 16px;
    }

    .ce-chat-suggestions {
        display: flex !important;
        gap: 6px !important;
        overflow-x: auto !important;
        flex-wrap: nowrap !important;
        padding-bottom: 4px !important;
        margin-bottom: 4px !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: 6px 12px !important;
        background: transparent !important;
        border: 1px solid rgba(255, 255, 255, 0.12) !important;
        border-radius: 14px !important;
        color: rgba(255, 255, 255, 0.85) !important;
        font-size: 13px !important;
        font-weight: 450 !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.05) !important;
        border-color: rgba(255, 255, 255, 0.2) !important;
    }

    /* Input bar mobile optimisée */
    .ce-chat-input-bar {
        display: flex !important;
        align-items: center !important;
        gap: 8px !important;
        background: transparent !important;
        border: none !important;
        border-radius: 0 !important;
        padding: 0 !important;
        height: auto !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: 8px 4px !important;
        outline: none !important;
        text-align: left !important;
        min-height: 24px !important;
    }

    .ce-chat-input:focus {
        outline: 2px solid rgba(139, 92, 246, 0.4) !important;
        outline-offset: 2px !important;
        border-radius: 4px !important;
    }

    .ce-chat-send-btn {
        min-width: 44px !important;
        min-height: 44px !important;
        width: 44px !important;
        height: 44px !important;
        border-radius: 12px !important;
        background: linear-gradient(135deg, rgba(139, 92, 246, 0.95) 0%, rgba(99, 102, 241, 0.95) 100%) !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;
        margin-right: 0 !important;
    }

    .ce-chat-send-btn:active {
        transform: scale(0.92) !important;
        background: linear-gradient(135deg, rgba(139, 92, 246, 1) 0%, rgba(99, 102, 241, 1) 100%) !important;
    }

    .ce-chat-send-btn svg {
        width: 20px !important;
        height: 20px !important;
        stroke: white !important;
        stroke-width: 2 !important;
    }

    /* Bouton scroll to bottom - Touch-friendly */
    .ce-scroll-to-bottom {
        position: fixed !important;
        bottom: calc(140px + env(safe-area-inset-bottom, 0px)) !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        min-width: 44px !important;
        min-height: 44px !important;
        width: 44px !important;
        height: 44px !important;
        border-radius: 50% !important;
        background: rgba(30, 25, 50, 0.95) !important;
        backdrop-filter: blur(8px) !important;
        border: 1px solid rgba(255, 255, 255, 0.12) !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 4px 16px 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.88) !important;
    }

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

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

    /* Suggestions horizontales scrollables */
    .ce-chat-suggestions {
        display: flex !important;
        margin-bottom: 12px;
    }

    .ce-chat-suggestion:active {
        transform: scale(0.96);
    }

    /* Force horizontal scroll pour "Autres annonces" même sur mobile */
    .ce-chat-annonces.autres {
        display: flex !important;
        flex-wrap: nowrap !important;
        grid-template-columns: none !important;
        overflow-x: auto !important;
        gap: 12px !important;
    }

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

@media (max-width: 400px) {
    .ce-chat-card-image {
        height: 180px;
    }

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

    .ce-message-user {
        font-size: 15px;
    }
}

/* ========== 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: var(--accent-light);
    border: 1px solid rgba(210, 133, 255, 0.25);
    border-radius: var(--radius-full);
    color: var(--accent);
    font-family: var(--font-chat);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ce-retry-btn:hover {
    background: rgba(210, 133, 255, 0.2);
    border-color: var(--accent);
    transform: translateY(-2px);
}

.ce-retry-btn svg {
    width: 16px;
    height: 16px;
    stroke: var(--accent);
}

.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
   ═══════════════════════════════════════════════════════════════ */

/* Animation subtile pour le bord */
@keyframes orionBorderPulse {
    0%, 100% { border-color: rgba(210, 133, 255, 0.25); }
    50% { border-color: rgba(210, 133, 255, 0.4); }
}

@keyframes orionLineGlow {
    0% { background-position: -100% 0; }
    100% { background-position: 200% 0; }
}

/* 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: linear-gradient(165deg, rgba(18, 14, 32, 0.95) 0%, rgba(12, 10, 25, 0.98) 100%);
    border: 1px solid rgba(210, 133, 255, 0.2);
    border-radius: 20px;
    padding: 0;
    overflow: hidden;
    animation: orionBorderPulse 4s ease-in-out infinite;
}

/* Ligne lumineuse en haut du bloc */
.orion-expert-bubble::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(210, 133, 255, 0.3) 20%,
        rgba(210, 133, 255, 0.8) 50%,
        rgba(210, 133, 255, 0.3) 80%,
        transparent 100%
    );
    background-size: 200% 100%;
    animation: orionLineGlow 3s ease-in-out infinite;
}

/* Effet de grille subtile en fond */
.orion-expert-bubble::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        linear-gradient(rgba(210, 133, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(210, 133, 255, 0.02) 1px, transparent 1px);
    background-size: 30px 30px;
    pointer-events: none;
    opacity: 0.5;
}

/* 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(210, 133, 255, 0.12);
    background: linear-gradient(180deg, rgba(210, 133, 255, 0.06) 0%, transparent 100%);
}

/* Icône - design épuré sans glow */
.orion-expert-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #A855F7 0%, #7C3AED 100%);
    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: linear-gradient(135deg, rgba(210, 133, 255, 0.25) 0%, rgba(168, 85, 247, 0.25) 100%);
    border: 1px solid rgba(210, 133, 255, 0.3);
    border-radius: 4px;
    color: #D285FF;
}

/* 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: linear-gradient(135deg, rgba(210, 133, 255, 0.12) 0%, rgba(147, 51, 234, 0.08) 100%);
    border: 1px solid rgba(210, 133, 255, 0.2);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    color: var(--accent);
    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: linear-gradient(145deg, rgba(28, 22, 50, 0.6) 0%, rgba(18, 14, 35, 0.4) 100%);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(210, 133, 255, 0.15);
    border-top: 2px solid rgba(210, 133, 255, 0.4);
    border-radius: 16px;
    padding: 24px 28px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), 0 0 24px rgba(210, 133, 255, 0.05);
}
