/* ── ChatBot ── */


/* ══════════════════════════════════════════
   CHATBOT WIDGET — Variables & Base
══════════════════════════════════════════ */
#chatbot-trigger {
    position: fixed;
    bottom: 28px; right: 28px;
    width: 58px; height: 58px;
    border-radius: 50%;
    background: linear-gradient(135deg, #8e1582, #22c55e 180%);
    border: none; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 8px 28px rgba(142,21,130,0.45);
    z-index: 9998;
    transition: transform 0.25s, box-shadow 0.25s;
}
#chatbot-trigger:hover { transform: scale(1.1); box-shadow: 0 12px 36px rgba(142,21,130,0.6); }
.cb-trigger-icon { color: #fff; font-size: 1.35rem; }
.cb-notif-dot {
    position: absolute; top: 5px; right: 5px;
    width: 12px; height: 12px;
    background: #22c55e; border-radius: 50%;
    border: 2px solid #0a0416;
    animation: notifPulse 2s ease-in-out infinite;
}
@keyframes notifPulse { 0%,100%{box-shadow:0 0 0 0 rgba(34,197,94,.5);} 70%{box-shadow:0 0 0 8px rgba(34,197,94,0);} }

/* ── Panneau ── */
#chatbot-panel {
    position: fixed;
    bottom: 90px; right: 90px;
    width: 380px;
    max-height: calc(100vh - 130px);
    background: #0d0820;
    border: 1px solid rgba(255,255,255,0.09);
    border-radius: 24px;
    display: flex; flex-direction: column;
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(0,0,0,0.7);
    z-index: 9997;
    opacity: 0; pointer-events: none;
    transform: translateY(20px) scale(0.97);
    transition: opacity 0.28s, transform 0.28s;
    font-family: 'Figtree', 'DM Sans', sans-serif;
}
#chatbot-panel.cb-open {
    opacity: 1; pointer-events: all;
    transform: translateY(0) scale(1);
}

/* ── Header ── */
.cb-header {
    display: flex; align-items: center; gap: 12px;
    padding: 18px 20px;
    background: linear-gradient(135deg, rgba(142,21,130,0.3), rgba(24,168,85,0.12));
    border-bottom: 1px solid rgba(255,255,255,0.06);
    flex-shrink: 0;
}
.cb-header-avatar { position: relative; flex-shrink: 0; }
.cb-header-avatar img { width: 42px; height: 42px; border-radius: 50%; object-fit: contain; background: rgba(255,255,255,0.08); padding: 4px; border: 1.5px solid rgba(255,255,255,0.1); }
.cb-online-dot { position: absolute; bottom: 0; right: 0; width: 11px; height: 11px; background: #22c55e; border-radius: 50%; border: 2px solid #0d0820; }
.cb-header-info { flex: 1; }
.cb-header-info strong { display: block; color: #fff; font-size: 0.95rem; font-family: 'Syne', sans-serif; }
.cb-header-info span   { color: rgba(255,255,255,0.4); font-size: 0.72rem; }
.cb-close-btn { background: rgba(255,255,255,0.07); border: none; color: rgba(255,255,255,0.5); width: 32px; height: 32px; border-radius: 8px; cursor: pointer; font-size: 0.9rem; transition: all 0.2s; display: flex; align-items: center; justify-content: center; }
.cb-close-btn:hover { background: rgba(255,255,255,0.13); color: #fff; }

/* ── Onglets ── */
.cb-tabs { display: flex; border-bottom: 1px solid rgba(255,255,255,0.06); flex-shrink: 0; }
.cb-tab {
    flex: 1; padding: 12px; border: none; background: none;
    color: rgba(255,255,255,.4); font-size: 0.83rem; font-weight: 600;
    cursor: pointer; transition: all 0.2s;
    display: flex; align-items: center; justify-content: center; gap: 6px;
    border-bottom: 2px solid transparent;
}
.cb-tab:hover { color: rgba(255,255,255,.75); }
.cb-tab.active { color: #22c55e; border-bottom-color: #22c55e; background: rgba(34,197,94,0.04); }
.cb-tab i { font-size: 0.85rem; }

/* ── Contenu ── */
.cb-content { flex: 1; overflow-y: auto; padding: 18px 16px; display: flex; flex-direction: column; gap: 12px; }
.cb-content::-webkit-scrollbar { width: 4px; }
.cb-content::-webkit-scrollbar-track { background: transparent; }
.cb-content::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 2px; }

.cb-intro { font-size: 0.84rem; color: rgba(255,255,255,0.55); line-height: 1.6; margin: 0; }

/* ── FAQ ── */
.cb-faq-list { display: flex; flex-direction: column; gap: 8px; }
.cb-faq-item { border: 1px solid rgba(255,255,255,0.06); border-radius: 14px; overflow: hidden; transition: border-color 0.3s; }
.cb-faq-item.cb-open { border-color: rgba(34,197,94,0.3); }
.cb-faq-q {
    width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px;
    padding: 13px 16px; background: none; border: none; cursor: pointer;
    color: rgba(255,255,255,0.8); font-size: 0.83rem; font-weight: 600; text-align: left;
    transition: background 0.2s;
}
.cb-faq-q:hover { background: rgba(255,255,255,0.03); }
.cb-faq-item.cb-open .cb-faq-q { color: #fff; background: rgba(34,197,94,0.05); }
.cb-faq-q i { flex-shrink: 0; color: rgba(255,255,255,0.3); font-size: 0.75rem; transition: transform 0.35s, color 0.2s; }
.cb-faq-item.cb-open .cb-faq-q i { transform: rotate(180deg); color: #22c55e; }
.cb-faq-a { 
    display: grid; 
    grid-template-rows: 0fr; 
    transition: grid-template-rows 0.38s cubic-bezier(0.4,0,0.2,1), visibility 0.38s; 
    overflow: hidden;
    visibility: hidden;
}
.cb-faq-item.cb-open .cb-faq-a { 
    grid-template-rows: 1fr; 
    visibility: visible;
}
.cb-faq-a > p { overflow: hidden; margin: 0; padding: 0 16px 14px; color: rgba(255,255,255,0.6); font-size: 0.8rem; line-height: 1.7; }
.cb-faq-a a { color: #22c55e; font-weight: 600; }

.cb-switch-btn {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    padding: 12px; border-radius: 14px; border: 1px dashed rgba(142,21,130,0.4);
    background: rgba(142,21,130,0.04); color: rgba(255,255,255,0.55);
    font-size: 0.8rem; font-weight: 600; cursor: pointer; transition: all 0.25s;
    width: 100%; margin-top: 4px;
}
.cb-switch-btn i { color: #8e1582; }
.cb-switch-btn:hover { background: rgba(142,21,130,0.1); border-color: rgba(142,21,130,0.6); color: rgba(255,255,255,0.8); }

/* ── Formulaire contact ── */
.cb-contact-form { display: flex; flex-direction: column; gap: 14px; }
.cb-field { display: flex; flex-direction: column; gap: 6px; }
.cb-field label { font-size: 0.74rem; font-weight: 700; color: rgba(255,255,255,0.45); text-transform: uppercase; letter-spacing: 0.8px; }
.cb-field label span { color: #8e1582; }
.cb-input-wrap {
    position: relative; display: flex; align-items: center;
    background: rgba(255,255,255,0.04); border: 1.5px solid rgba(255,255,255,0.08);
    border-radius: 12px; transition: border-color 0.25s, box-shadow 0.25s;
}
.cb-input-wrap:focus-within { border-color: rgba(142,21,130,0.5); box-shadow: 0 0 0 3px rgba(142,21,130,0.1); }
.cb-input-wrap > i { position: absolute; left: 13px; color: rgba(255,255,255,0.22); font-size: 0.82rem; pointer-events: none; }
.cb-input-wrap.is-invalid {
    border-color: rgba(239, 68, 68, 0.78);
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.18);
    background: rgba(239, 68, 68, 0.06);
}
.cb-input-wrap.is-invalid > i {
    color: #fca5a5;
}
.cb-field:has(.cb-input-wrap.is-invalid) label {
    color: #fecaca;
}
.cb-input-wrap input,
.cb-input-wrap select,
.cb-input-wrap textarea {
    width: 100%; border: none; background: transparent; outline: none;
    padding: 11px 12px 11px 36px; color: #fff; font-size: 0.85rem;
    font-family: 'Figtree', sans-serif; border-radius: 12px;
}
.cb-input-wrap input::placeholder { color: rgba(255,255,255,0.2); }
.cb-input-wrap textarea::placeholder { color: rgba(255,255,255,0.2); }
.cb-input-wrap select option { background: #1a0a2e; }
.cb-textarea-wrap { align-items: flex-start; }
.cb-textarea-wrap i { top: 13px; position: absolute; }
.cb-textarea-wrap textarea { resize: none; padding-top: 11px; }

.cb-send-btn {
    padding: 13px; border-radius: 14px;
    background: linear-gradient(135deg, #8e1582, #a855f7);
    color: #fff; border: none; font-family: 'Syne', sans-serif;
    font-weight: 700; font-size: 0.88rem; cursor: pointer;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    transition: opacity 0.2s, transform 0.2s;
    box-shadow: 0 6px 18px rgba(142,21,130,0.3);
}
.cb-send-btn:hover { opacity: 0.88; transform: translateY(-2px); }

.cb-success {
    display: flex; align-items: center; gap: 10px;
    background: rgba(34,197,94,0.1); border: 1px solid rgba(34,197,94,0.3);
    color: #22c55e; padding: 12px 16px; border-radius: 12px; font-size: 0.84rem; font-weight: 600;
}
.cb-error {
    display: flex; align-items: center; gap: 8px;
    background: rgba(239,68,68,0.08); border: 1px solid rgba(239,68,68,0.25);
    color: #f87171; padding: 12px 16px; border-radius: 12px; font-size: 0.82rem;
}

/* ── Pied de widget ── */
.cb-footer {
    padding: 12px 20px;
    background: rgba(0,0,0,0.2);
    border-top: 1px solid rgba(255,255,255,0.05);
    font-size: 0.72rem;
    color: rgba(255,255,255,0.3);
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-shrink: 0;
}
.cb-footer i { font-size: 0.65rem; color: rgba(142,21,130,0.6); }

/* ══════════════════════════════════════════
   MOBILE RESPONSIVE — Full Screen
   ══════════════════════════════════════════ */
@media (max-width: 600px) {
    #chatbot-panel {
        bottom: 0 !important;
        right: 0 !important;
        width: 100% !important;
        height: 100% !important;
        max-height: 100% !important;
        border-radius: 0 !important;
        border: none !important;
    }
    
    .cb-header {
        padding: 20px 16px;
    }
    
    .cb-content {
        padding: 24px 20px;
    }

    #chatbot-trigger {
        bottom: 20px;
        right: 20px;
    }
}