/**
 * CLARIS — claris-copilote.css (v6 · ATLAS PREMIUM · 2026-08-31)
 * Widget copilote Atlas — Glassmorphism premium façon Sésame 3C
 *   • Verre poli, halos animés violet/cyan, gradients doux
 *   • Micro-animations subtiles (Linear/Notion style)
 *   • Chips catégorisées cliquables, empty states riches
 *   • Compatible mobile
 * Classes techniques .papi-* préservées (le JS s'y appuie).
 */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Space+Grotesk:wght@500;600;700&display=swap');

/* ═══ TOKENS ═══ */
:root {
    --at-primary:   #1e3a6e;
    --at-primary-2: #2e5aa8;
    --at-accent:    #7c3aed;
    --at-cyan:      #22d3ee;
    --at-pink:      #ec4899;
    --at-text:      #0f172a;
    --at-text-sub:  #475569;
    --at-text-mut:  #94a3b8;
    --at-bg-soft:   #f8fafc;
    --at-white:     #ffffff;
    --at-border:    rgba(226, 232, 240, 0.6);
    --at-radius:    18px;
    --at-radius-sm: 12px;
    --at-radius-xs: 8px;
    --at-glass-bg:  rgba(255, 255, 255, 0.72);
    --at-glass-border: rgba(255, 255, 255, 0.9);
    --at-shadow-glow: 0 20px 60px -12px rgba(30, 58, 110, 0.35),
                      0 8px 24px -8px rgba(124, 58, 237, 0.18),
                      0 0 0 1px rgba(255, 255, 255, 0.6) inset;
    --at-shadow-sm: 0 2px 8px rgba(30, 58, 110, 0.06);
    --at-shadow-md: 0 8px 24px rgba(30, 58, 110, 0.15);
}

/* ═══ 1. BULLE FLOTTANTE (FAB) ═══ */
.papi-bubble {
    position: fixed; z-index: 9997;
    bottom: 24px; right: 24px;
    width: 62px; height: 62px;
    border-radius: 50%;
    background:
        radial-gradient(circle at 30% 25%, rgba(255,255,255,0.35) 0%, transparent 45%),
        linear-gradient(135deg, var(--at-primary) 0%, var(--at-accent) 55%, var(--at-cyan) 100%);
    box-shadow:
        0 12px 32px rgba(124, 58, 237, 0.4),
        0 0 0 6px rgba(124, 58, 237, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.25);
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s;
    animation: papi-bubble-pulse 4s ease-in-out infinite;
    font-family: 'Inter', system-ui, sans-serif;
}
.papi-bubble:hover {
    transform: scale(1.1) rotate(-4deg);
    box-shadow:
        0 20px 40px rgba(124, 58, 237, 0.55),
        0 0 0 10px rgba(124, 58, 237, 0.10),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
.papi-bubble:active { transform: scale(1.05) rotate(-2deg); }
@keyframes papi-bubble-pulse {
    0%, 100% { box-shadow: 0 12px 32px rgba(124, 58, 237, 0.4), 0 0 0 0 rgba(124, 58, 237, 0.35), inset 0 1px 0 rgba(255,255,255,0.25); }
    50%      { box-shadow: 0 12px 32px rgba(124, 58, 237, 0.4), 0 0 0 14px rgba(124, 58, 237, 0),   inset 0 1px 0 rgba(255,255,255,0.25); }
}
.papi-bubble-icon {
    font-size: 30px; line-height: 1;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
    animation: papi-icon-float 3s ease-in-out infinite;
}
@keyframes papi-icon-float { 50% { transform: translateY(-2px); } }
.papi-bubble-badge {
    position: absolute; top: -4px; right: -4px;
    min-width: 22px; height: 22px; padding: 0 6px;
    border-radius: 11px;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #fff; font-weight: 800; font-size: 11px;
    display: flex; align-items: center; justify-content: center;
    border: 2px solid #fff;
    box-shadow: 0 4px 8px rgba(239, 68, 68, 0.45);
    animation: papi-badge-pop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes papi-badge-pop { 0% { transform: scale(0); } 100% { transform: scale(1); } }

/* ═══ 2. PANEL PREMIUM (verre poli) ═══ */
.papi-panel {
    position: fixed; z-index: 9998;
    bottom: 100px; right: 24px;
    width: 420px; max-width: calc(100vw - 32px);
    height: 640px; max-height: calc(100vh - 130px);
    background:
        linear-gradient(180deg, rgba(255,255,255,0.78) 0%, rgba(255,255,255,0.88) 100%),
        radial-gradient(circle at 100% 0%, rgba(124, 58, 237, 0.12) 0%, transparent 50%),
        radial-gradient(circle at 0% 100%, rgba(34, 211, 238, 0.10) 0%, transparent 50%),
        var(--at-bg-soft);
    backdrop-filter: blur(30px) saturate(180%);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
    border: 1px solid var(--at-glass-border);
    border-radius: var(--at-radius);
    box-shadow: var(--at-shadow-glow);
    display: flex; flex-direction: column;
    overflow: hidden;
    animation: papi-panel-in 0.42s cubic-bezier(0.34, 1.2, 0.4, 1);
    font-family: 'Inter', system-ui, sans-serif;
    color: var(--at-text);
}
.papi-panel-expanded {
    width: min(720px, calc(100vw - 40px));
    height: min(85vh, 900px);
    transition: width 0.35s, height 0.35s;
}
@keyframes papi-panel-in {
    0%   { opacity: 0; transform: translateY(24px) scale(0.94); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

/* ═══ 3. HEADER PANEL ═══ */
.papi-panel-head {
    position: relative;
    padding: 16px 18px;
    display: flex; align-items: center; gap: 12px;
    background:
        linear-gradient(135deg, rgba(30, 58, 110, 0.98) 0%, rgba(46, 90, 168, 0.98) 60%, rgba(124, 58, 237, 0.96) 100%);
    color: #fff;
    overflow: hidden;
}
.papi-panel-head::before {
    content: '';
    position: absolute; inset: 0;
    background:
        radial-gradient(circle at 20% 20%, rgba(255,255,255,0.15) 0%, transparent 45%),
        radial-gradient(circle at 80% 80%, rgba(34, 211, 238, 0.20) 0%, transparent 40%);
    pointer-events: none;
    animation: papi-head-halo 8s ease-in-out infinite;
}
@keyframes papi-head-halo {
    0%,100% { transform: rotate(0deg) scale(1); opacity: 0.9; }
    50%     { transform: rotate(180deg) scale(1.15); opacity: 1; }
}
.papi-panel-head > * { position: relative; z-index: 1; }
.papi-panel-avatar {
    width: 40px; height: 40px; border-radius: 12px;
    background: rgba(255,255,255,0.18);
    backdrop-filter: blur(8px);
    display: flex; align-items: center; justify-content: center;
    font-size: 22px;
    border: 1px solid rgba(255,255,255,0.3);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.25);
}
.papi-panel-info { flex: 1; min-width: 0; }
.papi-panel-name {
    font-family: 'Space Grotesk', 'Inter', sans-serif;
    font-weight: 700; font-size: 17px;
    letter-spacing: -0.01em;
    line-height: 1.1;
}
.papi-panel-status {
    font-size: 11.5px; opacity: 0.88;
    display: flex; align-items: center; gap: 6px;
    margin-top: 2px;
    font-weight: 500;
}
.papi-dot {
    width: 7px; height: 7px; border-radius: 50%;
    background: #4ade80;
    box-shadow: 0 0 8px rgba(74, 222, 128, 0.6);
    animation: papi-dot-pulse 2.5s ease-in-out infinite;
}
@keyframes papi-dot-pulse { 50% { opacity: 0.4; transform: scale(0.85); } }
.papi-panel-btn, .papi-panel-close {
    width: 32px; height: 32px; border-radius: 10px;
    background: rgba(255,255,255,0.10);
    border: 1px solid rgba(255,255,255,0.15);
    color: #fff; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px;
    transition: all 0.2s;
    backdrop-filter: blur(4px);
}
.papi-panel-btn:hover, .papi-panel-close:hover {
    background: rgba(255,255,255,0.22);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.papi-panel-close { font-size: 20px; line-height: 1; font-weight: 300; }
.papi-push-btn.active { background: rgba(34, 211, 238, 0.35); border-color: rgba(34, 211, 238, 0.5); }

/* ═══ 4. NOTIFS ═══ */
.papi-notifs { padding: 10px 14px 4px; }
.papi-notif {
    background: rgba(255,255,255,0.7);
    border: 1px solid var(--at-border);
    border-left: 3px solid #60a5fa;
    border-radius: var(--at-radius-sm);
    padding: 10px 12px; margin-bottom: 8px;
    display: flex; gap: 10px;
    box-shadow: var(--at-shadow-sm);
    animation: papi-msg-in 0.3s ease-out;
}
.papi-notif.sev-info { border-left-color: #60a5fa; }
.papi-notif.sev-warning { border-left-color: #fbbf24; }
.papi-notif.sev-critical { border-left-color: #dc2626; }
.papi-notif-icon { font-size: 20px; flex-shrink: 0; }
.papi-notif-body { flex: 1; min-width: 0; font-size: 13px; }
.papi-notif-title { font-weight: 700; color: var(--at-text); margin-bottom: 2px; }
.papi-notif-msg { color: var(--at-text-sub); line-height: 1.45; }
.papi-notif-actions { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.papi-notif-act {
    padding: 5px 10px; font-size: 11.5px; font-weight: 600;
    border: none; border-radius: 8px;
    background: linear-gradient(135deg, var(--at-primary), var(--at-primary-2));
    color: #fff; cursor: pointer;
    transition: all 0.2s;
}
.papi-notif-act:hover { transform: translateY(-1px); box-shadow: 0 4px 10px rgba(30, 58, 110, 0.3); }
.papi-notif-dismiss {
    background: none; border: none; cursor: pointer;
    color: var(--at-text-mut); font-size: 18px; padding: 0 4px;
    line-height: 1;
}
.papi-notif-dismiss:hover { color: var(--at-text); }

/* ═══ 5. ZONE MESSAGES ═══ */
.papi-panel-messages {
    flex: 1; overflow-y: auto;
    padding: 18px 16px;
    display: flex; flex-direction: column; gap: 14px;
    scroll-behavior: smooth;
}
.papi-panel-messages::-webkit-scrollbar { width: 6px; }
.papi-panel-messages::-webkit-scrollbar-track { background: transparent; }
.papi-panel-messages::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--at-accent), var(--at-cyan));
    border-radius: 3px;
    opacity: 0.5;
}
.papi-panel-messages::-webkit-scrollbar-thumb:hover { opacity: 1; }

/* ═══ 6. BULLES MESSAGES ═══ */
.papi-msg {
    display: flex; gap: 10px; align-items: flex-start;
    animation: papi-msg-in 0.35s cubic-bezier(0.34, 1.2, 0.4, 1);
}
@keyframes papi-msg-in {
    0%   { opacity: 0; transform: translateY(10px); }
    100% { opacity: 1; transform: translateY(0); }
}
.papi-msg-papi { align-self: stretch; }
.papi-msg-user { align-self: flex-end; flex-direction: row-reverse; max-width: 88%; }

.papi-msg-avatar {
    width: 32px; height: 32px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 16px;
    background: linear-gradient(135deg, var(--at-primary), var(--at-accent));
    color: #fff;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
    border: 1px solid rgba(255,255,255,0.2);
}
.papi-msg-user .papi-msg-avatar {
    background: linear-gradient(135deg, #64748b, #475569);
    box-shadow: 0 4px 10px rgba(71, 85, 105, 0.3);
}
.papi-msg-body {
    background: var(--at-white);
    border: 1px solid var(--at-border);
    border-radius: 14px;
    padding: 12px 14px;
    box-shadow: var(--at-shadow-sm);
    font-size: 13.5px;
    line-height: 1.55;
    color: var(--at-text);
    max-width: 100%;
    word-wrap: break-word;
}
.papi-msg-user .papi-msg-body {
    background: linear-gradient(135deg, var(--at-primary), var(--at-primary-2));
    color: #fff;
    border-color: transparent;
}
.papi-msg-user .papi-msg-body a { color: #fff; text-decoration: underline; }
.papi-msg-text strong { color: var(--at-primary); font-weight: 700; }
.papi-msg-user .papi-msg-text strong { color: #fff; }
.papi-msg-text em { color: var(--at-accent); font-style: normal; font-weight: 500; }
.papi-msg-text br + em { display: inline-block; margin-top: 2px; }

/* ═══ 7. WELCOME HERO ═══ */
.papi-welcome-hero {
    text-align: center;
    padding: 8px 4px 4px;
    animation: papi-msg-in 0.5s ease-out;
}
.papi-welcome-hero .papi-hero-badge {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 5px 12px;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.1), rgba(34, 211, 238, 0.1));
    border: 1px solid rgba(124, 58, 237, 0.2);
    border-radius: 100px;
    font-size: 11px; font-weight: 600;
    color: var(--at-accent);
    margin-bottom: 12px;
    letter-spacing: 0.02em;
}
.papi-welcome-hero .papi-hero-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 20px; font-weight: 700;
    color: var(--at-text);
    letter-spacing: -0.02em;
    margin-bottom: 6px;
    line-height: 1.2;
}
.papi-welcome-hero .papi-hero-title .papi-hero-name {
    background: linear-gradient(135deg, var(--at-primary), var(--at-accent), var(--at-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.papi-welcome-hero .papi-hero-subtitle {
    font-size: 13px; color: var(--at-text-sub);
    line-height: 1.5;
    margin-bottom: 14px;
    padding: 0 12px;
}

/* Catégories dans le welcome */
.papi-welcome-cats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin: 12px 0 8px;
}
.papi-welcome-cat {
    background: rgba(255,255,255,0.6);
    backdrop-filter: blur(10px);
    border: 1px solid var(--at-border);
    border-radius: 14px;
    padding: 10px;
    text-align: left;
    cursor: pointer;
    transition: all 0.25s;
    position: relative;
    overflow: hidden;
}
.papi-welcome-cat::before {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(135deg, var(--_cat-c1, var(--at-accent)), var(--_cat-c2, var(--at-cyan)));
    opacity: 0;
    transition: opacity 0.25s;
    pointer-events: none;
    border-radius: 14px;
}
.papi-welcome-cat:hover {
    transform: translateY(-2px);
    border-color: transparent;
    box-shadow: 0 8px 20px rgba(124, 58, 237, 0.15);
}
.papi-welcome-cat:hover::before { opacity: 0.06; }
.papi-welcome-cat > * { position: relative; z-index: 1; }
.papi-welcome-cat.cat-reporting  { --_cat-c1: #2e5aa8; --_cat-c2: #22d3ee; }
.papi-welcome-cat.cat-recherche  { --_cat-c1: #7c3aed; --_cat-c2: #ec4899; }
.papi-welcome-cat.cat-documents  { --_cat-c1: #f59e0b; --_cat-c2: #ef4444; }
.papi-welcome-cat.cat-actions    { --_cat-c1: #10b981; --_cat-c2: #22d3ee; }
.papi-welcome-cat.cat-guides     { --_cat-c1: #64748b; --_cat-c2: #94a3b8; }
.papi-welcome-cat .papi-cat-icon {
    width: 30px; height: 30px; border-radius: 9px;
    background: linear-gradient(135deg, var(--_cat-c1), var(--_cat-c2));
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 15px;
    margin-bottom: 6px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}
.papi-welcome-cat .papi-cat-name {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700; font-size: 12.5px;
    color: var(--at-text);
    letter-spacing: -0.01em;
}
.papi-welcome-cat .papi-cat-hint {
    font-size: 11px; color: var(--at-text-mut);
    line-height: 1.35; margin-top: 2px;
}

/* Bandeau exemples cliquables (variante) */
.papi-suggestions-block {
    margin-top: 14px;
    padding: 12px;
    background: rgba(124, 58, 237, 0.04);
    border: 1px dashed rgba(124, 58, 237, 0.25);
    border-radius: var(--at-radius-sm);
}
.papi-suggestions-block .papi-sug-title {
    font-size: 11px; font-weight: 700;
    color: var(--at-accent);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}

/* Contexte hérité ─ chip discret */
.papi-inherit {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 4px 10px;
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.12), rgba(124, 58, 237, 0.08));
    border: 1px solid rgba(34, 211, 238, 0.3);
    border-radius: 100px;
    font-size: 11px; font-weight: 600;
    color: var(--at-primary-2);
    margin-bottom: 8px;
}

/* ═══ 8. TABLEAU ═══ */
.papi-table-wrap {
    margin: 10px 0 4px;
    border: 1px solid var(--at-border);
    border-radius: var(--at-radius-sm);
    overflow: auto;
    background: #fff;
    max-height: 340px;
    box-shadow: var(--at-shadow-sm);
}
.papi-table {
    width: 100%; border-collapse: collapse;
    font-size: 12px;
}
.papi-table thead {
    background: linear-gradient(180deg, #f8fafc, #f1f5f9);
    position: sticky; top: 0; z-index: 2;
}
.papi-table th {
    padding: 8px 10px; text-align: left;
    font-weight: 700; font-size: 10.5px;
    color: var(--at-text-sub);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom: 1px solid var(--at-border);
    white-space: nowrap;
}
.papi-table td {
    padding: 8px 10px;
    border-bottom: 1px solid #f1f5f9;
    color: var(--at-text);
    max-width: 200px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.papi-table tbody tr { transition: background 0.15s; }
.papi-table tbody tr:hover { background: rgba(124, 58, 237, 0.04); }
.papi-table tbody tr:last-child td { border-bottom: none; }
.papi-table a {
    color: var(--at-primary-2);
    font-weight: 600;
    text-decoration: none;
}
.papi-table a:hover { text-decoration: underline; }
.papi-table-more {
    padding: 8px 10px;
    font-size: 11.5px; font-style: italic;
    color: var(--at-text-mut);
    text-align: center;
    background: #f8fafc;
    border-top: 1px solid var(--at-border);
}

/* ═══ 9. STATS CARDS ═══ */
.papi-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 8px;
    margin: 10px 0 4px;
}
.papi-stat {
    padding: 12px;
    background: linear-gradient(135deg, var(--_st-c1, var(--at-primary)), var(--_st-c2, var(--at-primary-2)));
    color: #fff;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(30, 58, 110, 0.2);
    position: relative; overflow: hidden;
    transition: transform 0.2s;
}
.papi-stat::before {
    content: '';
    position: absolute; top: -50%; right: -50%;
    width: 100%; height: 100%;
    background: radial-gradient(circle, rgba(255,255,255,0.15), transparent 60%);
    pointer-events: none;
}
.papi-stat:hover { transform: translateY(-2px); }
.papi-stat-blue   { --_st-c1: #1e3a6e; --_st-c2: #2e5aa8; }
.papi-stat-violet { --_st-c1: #7c3aed; --_st-c2: #a855f7; }
.papi-stat-cyan   { --_st-c1: #06b6d4; --_st-c2: #22d3ee; }
.papi-stat-orange { --_st-c1: #f59e0b; --_st-c2: #fb923c; }
.papi-stat-red    { --_st-c1: #dc2626; --_st-c2: #ef4444; }
.papi-stat-green  { --_st-c1: #10b981; --_st-c2: #22c55e; }
.papi-stat-val {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700; font-size: 22px;
    letter-spacing: -0.02em;
    line-height: 1;
    margin-bottom: 4px;
    position: relative; z-index: 1;
}
.papi-stat-lbl {
    font-size: 10.5px; opacity: 0.92;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 500;
    position: relative; z-index: 1;
}

/* ═══ 10. ÉTAPES / GUIDES ═══ */
.papi-steps {
    margin: 10px 0 4px;
    padding: 0;
    counter-reset: papi-step;
    list-style: none;
}
.papi-steps li {
    counter-increment: papi-step;
    position: relative;
    padding: 8px 10px 8px 36px;
    background: rgba(255,255,255,0.7);
    border: 1px solid var(--at-border);
    border-radius: 10px;
    margin-bottom: 6px;
    font-size: 12.5px;
    line-height: 1.45;
    color: var(--at-text);
}
.papi-steps li::before {
    content: counter(papi-step);
    position: absolute; left: 8px; top: 50%;
    transform: translateY(-50%);
    width: 22px; height: 22px; border-radius: 50%;
    background: linear-gradient(135deg, var(--at-accent), var(--at-cyan));
    color: #fff;
    font-weight: 700; font-size: 11px;
    display: flex; align-items: center; justify-content: center;
}

/* ═══ 11. DRAFT MAIL ═══ */
.papi-draft {
    margin: 10px 0 4px;
    background: rgba(255,255,255,0.8);
    border: 1px solid var(--at-border);
    border-radius: var(--at-radius-sm);
    overflow: hidden;
    box-shadow: var(--at-shadow-sm);
}
.papi-draft-header {
    padding: 8px 12px;
    background: linear-gradient(135deg, var(--at-primary), var(--at-primary-2));
    color: #fff;
    font-weight: 600; font-size: 12px;
}
.papi-draft-row {
    padding: 6px 12px;
    font-size: 12px;
    border-bottom: 1px solid #f1f5f9;
    display: flex; gap: 8px; align-items: center;
}
.papi-draft-row strong {
    color: var(--at-text-sub);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    min-width: 45px;
}
.papi-draft-row code {
    font-family: 'JetBrains Mono', monospace;
    background: #f1f5f9;
    padding: 2px 6px; border-radius: 4px;
    font-size: 11px;
}
.papi-draft-body {
    padding: 12px;
    font-size: 12.5px;
    line-height: 1.6;
    color: var(--at-text);
    white-space: pre-wrap;
}

/* ═══ 12. BOUTONS & CHIPS ═══ */
.papi-btns {
    display: flex; flex-wrap: wrap; gap: 6px;
    margin: 10px 0 4px;
}
.papi-btn {
    padding: 7px 14px;
    border: none; cursor: pointer;
    border-radius: 10px;
    font-family: inherit;
    font-weight: 600; font-size: 12px;
    transition: all 0.2s;
}
.papi-btn-primary {
    background: linear-gradient(135deg, var(--at-primary), var(--at-primary-2));
    color: #fff;
    box-shadow: 0 4px 12px rgba(30, 58, 110, 0.25);
}
.papi-btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(30, 58, 110, 0.35); }
.papi-btn-ghost {
    background: rgba(255,255,255,0.7);
    color: var(--at-text-sub);
    border: 1px solid var(--at-border);
}
.papi-btn-ghost:hover { background: #fff; color: var(--at-text); border-color: var(--at-accent); }

.papi-suggestions {
    display: flex; flex-wrap: wrap; gap: 6px;
    margin: 10px 0 4px;
}
.papi-chip {
    padding: 6px 12px;
    border: 1px solid var(--at-border);
    background: rgba(255,255,255,0.7);
    color: var(--at-text-sub);
    border-radius: 100px;
    font-family: inherit;
    font-size: 11.5px; font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    backdrop-filter: blur(4px);
}
.papi-chip:hover {
    background: linear-gradient(135deg, var(--at-primary), var(--at-accent));
    color: #fff;
    border-color: transparent;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
}

/* ═══ 13. FEEDBACK 👍👎 ═══ */
.papi-feedback {
    display: flex; gap: 4px; align-items: center;
    margin-top: 6px;
    font-size: 11px;
    color: var(--at-text-mut);
}
.papi-fb-btn {
    background: none; border: none; cursor: pointer;
    padding: 2px 6px; font-size: 13px;
    border-radius: 6px;
    transition: all 0.15s;
}
.papi-fb-btn:hover { background: #f1f5f9; }
.papi-fb-btn.selected { background: rgba(74, 222, 128, 0.15); }

/* ═══ 14. INPUT ═══ */
.papi-panel-input {
    padding: 10px 12px 12px;
    border-top: 1px solid var(--at-border);
    background: linear-gradient(180deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.7) 100%);
    backdrop-filter: blur(10px);
    display: flex; gap: 8px; align-items: center;
}
.papi-mic-btn, .papi-send-btn {
    width: 38px; height: 38px; border-radius: 12px;
    border: 1px solid var(--at-border);
    background: #fff;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    font-size: 16px;
    transition: all 0.2s;
    flex-shrink: 0;
}
.papi-mic-btn:hover { background: rgba(124, 58, 237, 0.1); border-color: var(--at-accent); }
.papi-mic-btn.listening {
    background: linear-gradient(135deg, #dc2626, #ef4444);
    color: #fff; border-color: transparent;
    animation: papi-mic-pulse 1s ease-in-out infinite;
}
@keyframes papi-mic-pulse { 50% { transform: scale(0.92); } }
.papi-send-btn {
    background: linear-gradient(135deg, var(--at-primary), var(--at-accent));
    color: #fff; border-color: transparent;
    box-shadow: 0 4px 10px rgba(124, 58, 237, 0.3);
    position: relative;
}
.papi-send-btn::before {
    content: '';
    width: 0; height: 0;
    border-left: 8px solid #fff;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    margin-left: 2px;
}
.papi-send-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 14px rgba(124, 58, 237, 0.4); }
.papi-panel-input input {
    flex: 1;
    border: 1px solid var(--at-border);
    background: #fff;
    padding: 9px 14px;
    border-radius: 12px;
    font-family: inherit;
    font-size: 13px;
    color: var(--at-text);
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.papi-panel-input input:focus {
    border-color: var(--at-accent);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.12);
}
.papi-panel-input input::placeholder { color: var(--at-text-mut); }

/* ═══ 15. THINKING (3 dots) ═══ */
.papi-thinking {
    display: flex; gap: 3px; padding: 4px 0;
}
.papi-thinking span {
    width: 6px; height: 6px; border-radius: 50%;
    background: linear-gradient(135deg, var(--at-accent), var(--at-cyan));
    animation: papi-think 1.4s ease-in-out infinite;
}
.papi-thinking span:nth-child(1) { animation-delay: 0s; }
.papi-thinking span:nth-child(2) { animation-delay: 0.2s; }
.papi-thinking span:nth-child(3) { animation-delay: 0.4s; }
@keyframes papi-think {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.3; }
    30%           { transform: translateY(-6px); opacity: 1; }
}

/* ═══ 16. MODALE FICHE COMPTE ═══ */
.papi-atlas-modal-bg {
    position: fixed; inset: 0;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(8px);
    z-index: 10000;
    display: flex; align-items: center; justify-content: center;
    animation: papi-msg-in 0.25s;
}
.papi-atlas-modal {
    width: 90vw; height: 90vh;
    max-width: 1400px; max-height: 900px;
    background: #fff;
    border-radius: var(--at-radius);
    overflow: hidden;
    display: flex; flex-direction: column;
    box-shadow: 0 40px 80px rgba(0,0,0,0.5);
}
.papi-atlas-modal-head {
    padding: 14px 20px;
    background: linear-gradient(135deg, var(--at-primary), var(--at-accent));
    color: #fff;
    display: flex; align-items: center; gap: 12px;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700; font-size: 14px;
}
.papi-atlas-modal-head button {
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.25);
    color: #fff;
    padding: 6px 12px; border-radius: 8px;
    font-size: 12px; font-weight: 600;
    cursor: pointer;
    margin-left: auto;
}
.papi-atlas-modal-head button + button { margin-left: 6px; }
.papi-atlas-modal iframe {
    flex: 1; width: 100%;
    border: none;
    background: #fff;
}

/* ═══ 17. RESPONSIVE ═══ */
@media (max-width: 640px) {
    .papi-panel {
        bottom: 0; right: 0; left: 0;
        width: 100vw; max-width: 100vw;
        height: 100vh; max-height: 100vh;
        border-radius: 0;
    }
    .papi-panel-expanded { width: 100vw; height: 100vh; }
    .papi-atlas-modal {
        width: 100vw; height: 100vh; max-width: none; max-height: none;
        border-radius: 0;
    }
    .papi-welcome-cats { grid-template-columns: 1fr; }
    .papi-bubble { bottom: 16px; right: 16px; width: 56px; height: 56px; }
}
