/* Poignée de redimensionnement du webreport */
.ViewChat_webreport-wrapper {
    position: relative;
    display: none;
    width: 100%;
    min-height: 200px;
    margin: 12px 0 16px 0;
}

.ViewChat_webreport-wrapper.visible {
    display: block;
}

.ViewChat_webreport-wrapper > div[id^="ViewChat_webreport_"] {
    width: 100%;
    height: 100%;
    min-height: inherit;
}

.ViewChat_resize-handle {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 10px;
    cursor: ns-resize;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    z-index: 10;
    transition: background 0.2s;
    border-radius: 0 0 6px 6px;
}

.ViewChat_resize-handle:hover {
    background: rgba(66, 133, 244, 0.08);
}

.ViewChat_resize-handle::after {
    content: '';
    display: block;
    width: 40px;
    height: 4px;
    border-radius: 2px;
    background: #dadce0;
    transition: background 0.2s, transform 0.2s;
}

.ViewChat_resize-handle:hover::after {
    background: #4285f4;
    transform: scaleX(1.2);
}
/* Container principal */
.ViewChat_container {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 0;
    z-index: 9999;
    pointer-events: none;
}

.ViewChat_container.active {
    width: 100%;
    pointer-events: auto;
}

/* Panneau latéral droit */
.ViewChat_side-panel {
    position: fixed;
    top: 0;
    right: 0;
    bottom: auto;
    width: min(680px, 98vw);
    height: 100dvh;
    background: #ffffff;
    box-shadow: -2px 0 20px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10000;
}

.ViewChat_container.active .ViewChat_side-panel {
    transform: translateX(0);
}

/* Header du panneau */
.ViewChat_panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #e8eaed;
    flex-shrink: 0;
}

.ViewChat_header-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ViewChat_logo {
    font-size: 24px;
    line-height: 1;
}

.ViewChat_title {
    font-size: 20px;
    font-weight: 500;
    color: #202124;
    margin: 0;
}

.ViewChat_close-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    color: #5f6368;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.ViewChat_close-btn:hover {
    background: #f1f3f4;
}

/* Contenu principal */
.ViewChat_panel-content {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 20px;
}

/* Section découverte */
.ViewChat_discover-section {
    margin-bottom: 20px;
}

.ViewChat_section-title {
    font-size: 14px;
    font-weight: 400;
    color: #5f6368;
    margin: 0 0 16px 0;
}

/* Grille d'actions (cartes) */
.ViewChat_actions-grid {
    display: block;
}

.ViewChat_actions-dropdown {
    position: relative;
    width: 100%;
}

.ViewChat_actions-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ViewChat_actions-controls-main {
    flex: 1;
    min-width: 0;
}

.ViewChat_actions-empty {
    flex: 1;
    min-height: 46px;
    display: flex;
    align-items: center;
    padding: 0 14px;
    border: 1px solid #d7dce5;
    border-radius: 12px;
    color: #5f6368;
    font-size: 13px;
    background: #f9fbff;
}

.ViewChat_refresh-btn {
    width: 42px;
    height: 42px;
    border: 1px solid #d7dce5;
    border-radius: 12px;
    background: linear-gradient(180deg, #ffffff 0%, #f5f8ff 100%);
    color: #1967d2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.ViewChat_refresh-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(25, 103, 210, 0.16);
}

.ViewChat_refresh-btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.ViewChat_refresh-btn.loading i {
    animation: ViewChatSpin 0.85s linear infinite;
}

@keyframes ViewChatSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.ViewChat_actions-dropdown-toggle {
    width: 100%;
    border: 1px solid #d7dce5;
    background: linear-gradient(180deg, #ffffff 0%, #f9fbff 100%);
    border-radius: 12px;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    font-size: 14px;
    color: #202124;
    box-shadow: 0 2px 10px rgba(17, 24, 39, 0.06);
}

.ViewChat_actions-dropdown-main {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ViewChat_actions-dropdown-main i {
    color: #1967d2;
    font-size: 16px;
}

.ViewChat_actions-dropdown-text {
    font-weight: 500;
}

.ViewChat_actions-dropdown-chevron {
    color: #5f6368;
    transition: transform 0.2s ease;
}

.ViewChat_actions-dropdown.open .ViewChat_actions-dropdown-chevron {
    transform: rotate(180deg);
}

.ViewChat_actions-dropdown-menu {
    margin-top: 8px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(17, 24, 39, 0.12);
    max-height: 380px;
    overflow: auto;
    padding: 8px;
}

/* Carte d'action (style Gemini) */
.ViewChat_dropdown-item {
    background: #f8f9fa;
    border: 1px solid #e8eaed;
    border-radius: 12px;
    padding: 10px 12px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    text-align: left;
    font-family: inherit;
    border: 1px solid #e8eaed;
    margin-bottom: 8px;
}

.ViewChat_dropdown-item:last-child {
    margin-bottom: 0;
}

.ViewChat_dropdown-item:hover {
    background: #f1f3f4;
    border-color: #dadce0;
    transform: translateX(1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.ViewChat_dropdown-item.active {
    background: #e8f0fe;
    border-color: #4285f4;
}

.ViewChat_card-icon-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 20px;
    color: #5f6368;
}

.ViewChat_dropdown-item:hover .ViewChat_card-icon-circle {
    background: #e8f0fe;
    color: #1967d2;
}

.ViewChat_dropdown-item.active .ViewChat_card-icon-circle {
    background: #4285f4;
    color: #ffffff;
}

.ViewChat_card-content {
    flex: 1;
    min-width: 0;
}

.ViewChat_card-title {
    font-size: 15px;
    font-weight: 500;
    color: #202124;
    margin: 0 0 2px 0;
}

.ViewChat_card-desc {
    font-size: 12px;
    line-height: 1.35;
    color: #5f6368;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

 

/* Animation de réflexion de l'IA */
.ViewChat_thinking-animation {
    margin-top: 24px;
    padding: 32px 24px;
    text-align: center;
    animation: ViewChat_fadeIn 0.3s ease;
}

.ViewChat_thinking-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.ViewChat_thinking-icon {
    width: 25px;
    height: 25px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4285f4 0%, #1967d2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
    animation: ViewChat_pulse 2s ease-in-out infinite;
}

.ViewChat_thinking-text {
    font-size: 15px;
    font-weight: 500;
    color: #202124;
}

.ViewChat_thinking-dots {
    display: flex;
    gap: 8px;
}

.ViewChat_thinking-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #4285f4;
    animation: ViewChat_bounce 1.4s ease-in-out infinite;
}

.ViewChat_thinking-dots span:nth-child(1) {
    animation-delay: 0s;
}

.ViewChat_thinking-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.ViewChat_thinking-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes ViewChat_pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(66, 133, 244, 0.7);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(66, 133, 244, 0);
    }
}

@keyframes ViewChat_bounce {
    0%, 80%, 100% {
        transform: scale(0);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Zone de résultat */
.ViewChat_result-area {
    margin-top: 24px;
    animation: ViewChat_fadeIn 0.3s ease;
}

.ViewChat_result-content {
    background: #ffffff;
    border: 1px solid #e8eaed;
    border-radius: 12px;
    padding: 10px;
}

.ViewChat_result-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.ViewChat_result-icon {
    font-size: 20px;
    color: #4285f4;
}

.ViewChat_result-header h4 {
    font-size: 15px;
    font-weight: 400;
    color: #202124;
    margin: 0;
}

.ViewChat_result-text {
    font-size: 14px;
    color: #202124;
    line-height: 1.7;
    white-space: pre-wrap;
    word-wrap: break-word;
    margin-bottom: 16px;
}

/* Actions rapides (Insérer, Copier, etc.) */
.ViewChat_result-actions {
    display: flex;
    gap: 8px;
    padding-top: 12px;
    border-top: 1px solid #e8eaed;
    margin-bottom: 12px;
}

.ViewChat_action-btn {
    background: transparent;
    border: none;
    color: #1967d2;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 4px;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.ViewChat_action-btn:hover {
    background: #e8f0fe;
}

.ViewChat_action-btn i {
    font-size: 14px;
}

.ViewChat_add-webreport {
    color: #1967d2;
}

.ViewChat_more-btn {
    margin-left: auto;
    padding: 8px;
}

/* Suggestions rapides */
.ViewChat_suggestions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.ViewChat_suggestion-btn {
    background: #f8f9fa;
    border: 1px solid #e8eaed;
    color: #202124;
    font-size: 13px;
    cursor: pointer;
    padding: 6px 12px;
    border-radius: 16px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.ViewChat_suggestion-btn:hover {
    background: #e8f0fe;
    border-color: #4285f4;
}

.ViewChat_suggestion-btn i {
    font-size: 12px;
}

/* Zone de saisie chat en bas */
.ViewChat_chat-input-container {
    padding: 12px 20px;
    border-top: 1px solid #e8eaed;
    flex-shrink: 0;
    background: #ffffff;
}

.ViewChat_input-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f8f9fa;
    border: 1px solid #e8eaed;
    border-radius: 24px;
    padding: 4px 4px 4px 16px;
    transition: all 0.2s;
}

.ViewChat_input-wrapper:focus-within {
    background: #ffffff;
    border-color: #4285f4;
    box-shadow: 0 1px 6px rgba(66, 133, 244, 0.2);
}

.ViewChat_chat-input {
    flex: 1;
    border: none;
    background: transparent;
    outline: none;
    font-size: 14px;
    color: #202124;
    padding: 8px 0;
}

.ViewChat_chat-input::placeholder {
    color: #5f6368;
}

.ViewChat_send-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: #4285f4;
    color: white;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.ViewChat_send-btn:hover {
    background: #1967d2;
    transform: scale(1.05);
}

.ViewChat_send-btn:active {
    transform: scale(0.95);
}

.ViewChat_send-btn.loading {
    background: #5f6368;
    cursor: not-allowed;
}

.ViewChat_send-icon {
    font-size: 18px;
    font-weight: bold;
}

.ViewChat_spinner {
    display: none;
    width: 18px;
    height: 18px;
    border: 2px solid #ffffff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: ViewChat_spin 0.8s linear infinite;
}

.ViewChat_send-btn.loading .ViewChat_spinner {
    display: block;
}

.ViewChat_send-btn.loading .ViewChat_send-icon {
    display: none;
}

/* Animations */
@keyframes ViewChat_fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes ViewChat_spin {
    to {
        transform: rotate(360deg);
    }
}

/* Scrollbar personnalisée */
.ViewChat_panel-content::-webkit-scrollbar {
    width: 8px;
}

.ViewChat_panel-content::-webkit-scrollbar-track {
    background: transparent;
}

.ViewChat_panel-content::-webkit-scrollbar-thumb {
    background: #dadce0;
    border-radius: 4px;
}

.ViewChat_panel-content::-webkit-scrollbar-thumb:hover {
    background: #bdc1c6;
}

.generate-ai-btn {
    position: absolute;
    right: 20px;
    bottom: 20px;
    width: 55px;
    height: 55px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #00c6ff, #0072ff);
    color: white;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    z-index: 10;
  }
  
.generate-ai-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
  }
  
.generate-ai-btn i {
    font-size: 22px;
  }

.ViewChat_widget-kpi {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 12px 0 14px 0;
  padding: 22px 24px;
  border-radius: 20px;
  border: 1px solid #d9def7;
  background: linear-gradient(140deg, var(--kpi-bg-start, #f6d6ff) 0%, var(--kpi-bg-end, #ddb7ff) 100%);
  color: #2f2142;
  box-shadow: 0 12px 28px var(--kpi-shadow, rgba(165, 113, 214, 0.24));
}

.ViewChat_widget-kpi__content {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ViewChat_widget-kpi__value {
  font-size: clamp(22px, 2.4vw, 42px);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: #2b1f3e;
  word-break: break-word;
}

.ViewChat_widget-kpi__title {
  font-size: clamp(16px, 1.8vw, 28px);
  line-height: 1.1;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: rgba(47, 33, 66, 0.92);
}

.ViewChat_widget-kpi__icon {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.36);
  border: 1px solid rgba(255, 255, 255, 0.6);
  color: #3e2b5b;
  font-size: 24px;
}
  

/* Responsive */
@media (max-width: 768px) {
    .ViewChat_side-panel {
        width: 100vw;
    }

    .ViewChat_widget-kpi {
      padding: 18px 16px;
      gap: 12px;
      border-radius: 16px;
    }

    .ViewChat_widget-kpi__icon {
      width: 46px;
      height: 46px;
      border-radius: 12px;
      font-size: 20px;
    }
}


.ViewChat_suggestions-chips {
  display: flex;
  flex-direction: row;
  gap: 8px;
  padding: 12px 16px;
  margin-top: auto; /* pousse vers le bas */
}

.ViewChat_chip {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  flex: 1;
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  padding: 10px 10px;
  font-size: 11px;
  color: #374151;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  min-height: 64px;
}

.ViewChat_chip:hover {
  background: #f0f5ff;
  border-color: #4f6ef7;
  box-shadow: 0 2px 8px rgba(79, 110, 247, 0.15);
  transform: translateY(-1px);
}


.ViewChat_chip-label {
  font-size: 11px;
  font-weight: 500;
  color: #374151;
  line-height: 1.3;
}

.ViewChat_welcome-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 48px 16px;
  gap: 16px;
}

.ViewChat_welcome-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4285f4, #1967d2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 28px;
}

.ViewChat_welcome-title {
  font-size: 15px;
  font-weight: 500;
  color: #5f6368;
  margin: 0;
}