/* ========================================================
   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 : cacher le badge version */
@media (max-width: 768px) {
    .ce-version-badge {
        display: none;
    }
}

.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: 20px;
    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 var(--border-light);
    border-radius: var(--radius-m);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.ce-chat-card:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5), 0 0 20px rgba(210, 133, 255, 0.15);
}

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

.ce-chat-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

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

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

.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.7;
    flex-shrink: 0;
}

.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 var(--border-light);
}

.ce-card-source-logo {
    height: 16px;
    width: auto;
    max-width: 70px;
    opacity: 0.8;
}

.ce-card-vendor-badge {
    height: 18px;
    width: auto;
    max-width: 80px;
}

/* Bouton like */
/* Bouton MATCH sur les annonces */
.ce-card-match-btn {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 4px 8px 4px 4px;
    background: rgba(0, 229, 255, 0.08);
    border: 1px solid rgba(0, 229, 255, 0.25);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.25s ease;
}

.ce-card-match-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, #00E5FF, #00b4dc);
    border-radius: 4px;
    flex-shrink: 0;
    transition: all 0.25s ease;
}

.ce-card-match-icon svg {
    width: 11px;
    height: 11px;
    stroke: #ffffff;
    stroke-width: 2;
    fill: none;
    transition: all 0.2s;
}

.ce-card-match-text {
    font-size: 10px;
    font-weight: 700;
    color: #00E5FF;
    letter-spacing: 0.05em;
    transition: all 0.2s;
}

.ce-card-match-btn:hover {
    background: rgba(0, 229, 255, 0.15);
    border-color: rgba(0, 229, 255, 0.4);
    transform: scale(1.02);
}

.ce-card-match-btn:hover .ce-card-match-icon {
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(0, 229, 255, 0.4);
}

/* État liked - fond blanc, texte noir */
.ce-card-match-btn.liked {
    background: #ffffff;
    border-color: #ffffff;
}

.ce-card-match-btn.liked .ce-card-match-icon {
    background: linear-gradient(135deg, #00E5FF, #00b4dc);
}

.ce-card-match-btn.liked .ce-card-match-icon svg {
    fill: #ffffff;
    stroke: #ffffff;
}

.ce-card-match-btn.liked .ce-card-match-text {
    color: #000000;
}

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

.ce-autres-title {
    font-size: 16px;
    color: var(--text-main);
    margin: 0 0 16px 0;
    font-weight: 400;
    line-height: 1.6;
}

.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: var(--accent) rgba(255, 255, 255, 0.1);
}

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

.ce-chat-annonces.autres::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.ce-chat-annonces.autres::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 3px;
}

.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-image {
    height: 120px;
}

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

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

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

/* ========== 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 70%,
        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(135deg, rgba(35, 28, 65, 0.9) 0%, rgba(25, 20, 50, 0.95) 100%);
    border: 1.5px solid rgba(210, 133, 255, 0.3);
    border-radius: var(--radius-full);
    padding: 12px 20px;
    color: var(--text-main);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    animation: borderGlow 3s ease-in-out infinite;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

/* Effet shimmer subtil sur le texte */
.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.08) 50%,
        transparent 100%
    );
    background-size: 200% 100%;
    animation: shimmer 4s ease-in-out infinite;
    pointer-events: none;
}

.ce-chat-suggestion:hover {
    background: linear-gradient(135deg, rgba(50, 40, 85, 0.95) 0%, rgba(35, 28, 65, 0.98) 100%);
    border-color: var(--accent);
    transform: translateY(-3px) scale(1.02);
    box-shadow:
        0 6px 20px rgba(210, 133, 255, 0.25),
        0 0 0 1px rgba(210, 133, 255, 0.3);
    animation: none;
}

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

/* 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(135deg, rgba(45, 35, 80, 0.95) 0%, rgba(30, 25, 60, 0.98) 100%);
    border-color: rgba(210, 133, 255, 0.4);
}

/* 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: rgba(25, 20, 45, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-full);
    padding: 4px 4px 4px 24px;
    max-width: 860px;
    margin: 0 auto;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.ce-chat-input-bar:focus-within {
    border-color: var(--accent);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4), 0 0 0 2px var(--accent-glow);
}

.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: var(--accent);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ce-chat-send-btn:hover {
    background: var(--accent-hover);
    transform: scale(1.05);
}

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

.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) {
    .ce-listing-container {
        padding: 20px 16px;
        padding-bottom: 210px;
    }

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

    .ce-messages {
        gap: 24px;
    }

    .ce-chat-footer {
        left: 0;
        padding: 16px 16px 20px;
    }

    .ce-message-user {
        max-width: 85%;
        font-size: 17px;
        padding: 14px 18px;
    }

    .ce-message-assistant-content {
        font-size: 17px;
        line-height: 1.65;
    }

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

    .ce-chat-annonces {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .ce-chat-card {
        border-radius: var(--radius-m);
    }

    .ce-chat-card-image {
        height: 200px;
    }

    .ce-chat-card-body {
        padding: 16px;
    }

    .ce-chat-card-title {
        font-size: 17px;
    }

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

    .ce-chat-card-price {
        font-size: 19px;
    }

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

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

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

    .ce-chat-suggestions {
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 4px;
        gap: 8px;
    }

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

    .ce-chat-suggestion {
        padding: 10px 16px;
        font-size: 13px;
        flex-shrink: 0;
    }

    .ce-chat-input-bar {
        height: 54px;
    }

    .ce-chat-send-btn {
        width: 46px;
        height: 46px;
        min-width: 46px;
    }

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

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