JTh34's picture
🚀 Déploiement automatique RAG CHU 2025-07-01 10:05:48
b7b022c
/* Reset et base */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
background: linear-gradient(135deg, #1e40af 0%, #0f766e 100%);
min-height: 100vh;
overflow-x: hidden;
overflow-y: auto;
margin: 0;
padding: 0;
}
.App {
min-height: 100vh;
display: flex;
flex-direction: column;
}
/* Header */
.app-header {
background: linear-gradient(90deg, #1e40af 0%, #0369a1 50%, #f59e0b 100%);
border-bottom: 1px solid rgba(255, 255, 255, 0.3);
padding: 1rem 2rem;
position: relative;
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}
.app-header h1 {
color: white;
font-size: 1.8rem;
margin-bottom: 0.5rem;
}
.app-header p {
color: rgba(255, 255, 255, 0.8);
font-size: 1rem;
}
/* Layout principal en 3 colonnes */
.app-grid {
display: flex;
min-height: calc(100vh - 120px);
gap: 1rem;
padding: 1rem;
flex: 1;
max-width: 100vw;
overflow-x: hidden;
}
/* Colonne gauche - Documents (étroite) */
.left-column {
width: 260px;
min-width: 240px;
max-width: 300px;
display: flex;
flex-direction: column;
gap: 1rem;
flex-shrink: 1;
}
/* Colonne centre - Chat (large) */
.center-column {
flex: 1;
min-width: 300px;
display: flex;
flex-direction: column;
overflow: hidden;
}
/* Colonne droite - Console (fixe) */
.right-column {
width: 320px;
min-width: 280px;
max-width: 350px;
display: flex;
flex-direction: column;
flex-shrink: 1;
}
/* Cards communes */
.card {
background: rgba(255, 255, 255, 0.1);
backdrop-filter: blur(15px);
border-radius: 16px;
border: 1px solid rgba(255, 255, 255, 0.2);
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
padding: 1.5rem;
color: white;
}
.card h2 {
margin-bottom: 1rem;
font-size: 1.2rem;
color: white;
display: flex;
align-items: center;
gap: 0.5rem;
}
/* Upload zone (compacte) */
.upload-zone {
border: 2px dashed rgba(255, 255, 255, 0.3);
border-radius: 12px;
padding: 1rem;
text-align: center;
cursor: pointer;
transition: all 0.3s ease;
min-height: 100px;
}
.upload-zone:hover,
.upload-zone.drag-active {
border-color: rgba(255, 255, 255, 0.6);
background: rgba(255, 255, 255, 0.05);
}
.upload-icon {
font-size: 2rem;
margin-bottom: 0.5rem;
font-weight: 300;
color: rgba(255, 255, 255, 0.7);
}
.upload-text {
font-size: 0.9rem;
color: rgba(255, 255, 255, 0.8);
margin-bottom: 0.5rem;
}
.upload-hint {
font-size: 0.75rem;
color: rgba(255, 255, 255, 0.6);
}
/* Liste documents (compacte) */
.documents-list {
max-height: 300px;
overflow-y: auto;
overflow-x: hidden;
}
.document-item {
padding: 0.75rem;
margin-bottom: 0.5rem;
background: rgba(255, 255, 255, 0.1);
border-radius: 8px;
cursor: pointer;
transition: all 0.2s ease;
border: 1px solid transparent;
display: flex;
align-items: center;
justify-content: space-between;
gap: 0.5rem;
}
.document-item:hover {
background: rgba(255, 255, 255, 0.15);
}
.document-item.selected {
border-color: #f59e0b;
background: rgba(245, 158, 11, 0.2);
}
.document-content {
flex: 1;
min-width: 0;
}
.document-name {
font-size: 0.85rem;
font-weight: 600;
margin-bottom: 0.25rem;
}
.document-status {
font-size: 0.7rem;
opacity: 0.8;
}
.delete-btn {
background: rgba(239, 68, 68, 0.2);
border: 1px solid rgba(239, 68, 68, 0.4);
color: #ef4444;
border-radius: 6px;
padding: 0.3rem 0.5rem;
font-size: 0.9rem;
cursor: pointer;
transition: all 0.2s ease;
flex-shrink: 0;
}
.delete-btn:hover {
background: rgba(239, 68, 68, 0.4);
border-color: rgba(239, 68, 68, 0.6);
transform: scale(1.05);
}
.delete-btn:active {
transform: scale(0.95);
}
/* Interface Chat (centre) */
.chat-container {
display: flex;
flex-direction: column;
height: 100%;
overflow: hidden;
}
.chat-messages {
flex: 1;
overflow-y: auto;
overflow-x: hidden;
padding: 1rem;
display: flex;
flex-direction: column;
gap: 1rem;
max-height: calc(100vh - 300px);
word-wrap: break-word;
overflow-wrap: break-word;
}
.message {
display: flex;
flex-direction: column;
max-width: 80%;
}
.message.message-user {
align-self: flex-end;
}
.message.message-assistant {
align-self: flex-start;
}
.message-content {
padding: 1rem 1.5rem;
border-radius: 18px;
line-height: 1.5;
word-wrap: break-word;
overflow-wrap: break-word;
max-width: 100%;
}
.message-user .message-content {
background: linear-gradient(135deg, #0369a1, #0f766e);
color: white;
}
.message-assistant .message-content {
background: rgba(255, 255, 255, 0.1);
border: 1px solid rgba(255, 255, 255, 0.2);
color: white;
}
.chat-input-container {
padding: 1rem;
border-top: 1px solid rgba(255, 255, 255, 0.2);
display: flex;
gap: 1rem;
align-items: flex-end;
}
.chat-input {
flex: 1;
background: rgba(255, 255, 255, 0.1);
border: 1px solid rgba(255, 255, 255, 0.3);
border-radius: 12px;
padding: 0.75rem 1rem;
color: white;
resize: none;
min-height: 44px;
max-height: 120px;
word-wrap: break-word;
overflow-wrap: break-word;
}
.chat-input::placeholder {
color: rgba(255, 255, 255, 0.6);
}
.chat-input:focus {
outline: none;
border-color: rgba(255, 255, 255, 0.5);
}
/* Console de Debug (droite) */
.debug-console {
height: 100%;
background: rgba(0, 0, 0, 0.4);
backdrop-filter: blur(10px);
border-radius: 16px;
border: 1px solid rgba(255, 255, 255, 0.1);
display: flex;
flex-direction: column;
overflow: hidden;
}
.debug-console-header {
padding: 1rem 1.5rem;
border-bottom: 1px solid rgba(255, 255, 255, 0.1);
background: rgba(255, 255, 255, 0.05);
}
.debug-console-header h3 {
color: #f59e0b;
font-size: 1rem;
display: flex;
align-items: center;
gap: 0.5rem;
}
.debug-console-content {
flex: 1;
overflow-y: auto;
overflow-x: hidden;
padding: 1rem;
font-family: 'Monaco', 'Menlo', monospace;
font-size: 0.8rem;
line-height: 1.4;
max-height: calc(100vh - 200px);
}
.debug-log {
margin-bottom: 0.5rem;
padding: 0.5rem 0.75rem;
border-radius: 6px;
border-left: 3px solid;
background: rgba(255, 255, 255, 0.05);
}
.debug-log.info {
border-left-color: #3b82f6;
color: #93c5fd;
}
.debug-log.success {
border-left-color: #0f766e;
color: #5eead4;
}
.debug-log.warning {
border-left-color: #d97706;
color: #fbbf24;
}
.debug-log.error {
border-left-color: #ef4444;
color: #fca5a5;
}
.debug-log.vision {
border-left-color: #0369a1;
color: #7dd3fc;
}
.debug-log.chunking {
border-left-color: #0891b2;
color: #67e8f9;
}
.debug-log.rag {
border-left-color: #0f766e;
color: #5eead4;
}
.debug-timestamp {
color: rgba(255, 255, 255, 0.5);
font-size: 0.7rem;
margin-right: 0.5rem;
}
.debug-message {
word-wrap: break-word;
}
/* Boutons */
.btn {
background: linear-gradient(135deg, #0369a1, #0f766e);
color: white;
border: none;
padding: 0.75rem 1.5rem;
border-radius: 12px;
cursor: pointer;
font-weight: 600;
transition: all 0.2s ease;
font-size: 0.9rem;
}
.btn:hover {
transform: translateY(-1px);
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}
.btn:disabled {
opacity: 0.5;
cursor: not-allowed;
transform: none;
}
.btn-secondary {
background: rgba(255, 255, 255, 0.1);
border: 1px solid rgba(255, 255, 255, 0.3);
}
.btn-small {
padding: 0.5rem 1rem;
font-size: 0.8rem;
}
/* Alerts */
.alert {
padding: 0.75rem 1rem;
border-radius: 8px;
margin-bottom: 1rem;
font-size: 0.9rem;
}
.alert-error {
background: rgba(239, 68, 68, 0.2);
border: 1px solid #ef4444;
color: #fca5a5;
}
.alert-success {
background: rgba(15, 118, 110, 0.2);
border: 1px solid #0f766e;
color: #5eead4;
}
/* Loading */
.loading {
display: inline-block;
width: 16px;
height: 16px;
border: 2px solid rgba(255, 255, 255, 0.3);
border-top: 2px solid white;
border-radius: 50%;
animation: spin 1s linear infinite;
}
@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
/* Empty state */
.empty-state {
text-align: center;
padding: 3rem 2rem;
color: rgba(255, 255, 255, 0.7);
}
.empty-state h3 {
margin-bottom: 1rem;
color: white;
}
/* Scrollbar styling */
::-webkit-scrollbar {
width: 6px;
}
::-webkit-scrollbar-track {
background: rgba(255, 255, 255, 0.1);
border-radius: 3px;
}
::-webkit-scrollbar-thumb {
background: rgba(255, 255, 255, 0.3);
border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
background: rgba(255, 255, 255, 0.5);
}
/* Responsive */
@media (max-width: 1400px) {
.app-grid {
gap: 0.75rem;
padding: 0.75rem;
}
.left-column {
width: 220px;
min-width: 200px;
}
.right-column {
width: 280px;
min-width: 260px;
}
}
@media (max-width: 1200px) {
.app-grid {
gap: 0.5rem;
padding: 0.5rem;
}
.left-column {
width: 200px;
min-width: 180px;
}
.right-column {
width: 250px;
min-width: 220px;
}
.center-column {
min-width: 250px;
}
}
@media (max-width: 1024px) {
.app-grid {
flex-direction: column;
min-height: auto;
gap: 0.75rem;
}
.left-column,
.right-column {
width: 100%;
min-width: auto;
max-width: none;
max-height: 300px;
min-height: 200px;
}
.center-column {
min-height: 400px;
min-width: auto;
flex: 1;
}
}
@media (max-width: 768px) {
.app-grid {
padding: 0.5rem;
gap: 0.5rem;
}
.app-header {
padding: 0.5rem 1rem;
}
.app-header h1 {
font-size: 1.4rem;
}
.app-header p {
font-size: 0.9rem;
}
.card {
padding: 1rem;
}
.left-column,
.right-column {
max-height: 250px;
}
}
@media (max-width: 480px) {
.app-grid {
padding: 0.25rem;
}
.app-header {
padding: 0.5rem;
}
.app-header h1 {
font-size: 1.2rem;
}
.card {
padding: 0.75rem;
}
.card h2 {
font-size: 1rem;
}
}
/* Animation pour le curseur de streaming */
.streaming-cursor {
color: #10b981;
font-weight: bold;
animation: blink 1s infinite;
margin-left: 2px;
}
@keyframes blink {
0%, 50% { opacity: 1; }
51%, 100% { opacity: 0; }
}
/* Spinner médical élégant */
.medical-spinner {
width: 20px;
height: 20px;
border: 2px solid rgba(255, 255, 255, 0.1);
border-left: 2px solid #10b981;
border-radius: 50%;
animation: medical-spin 1s linear infinite;
flex-shrink: 0;
}
@keyframes medical-spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}