/* Reset et variables CSS */ :root { /* Couleurs principales */ --primary-50: #f0f9ff; --primary-100: #e0f2fe; --primary-500: #0ea5e9; --primary-600: #0284c7; --primary-700: #0369a1; /* Couleurs neutres */ --gray-50: #f9fafb; --gray-100: #f3f4f6; --gray-200: #e5e7eb; --gray-300: #d1d5db; --gray-400: #9ca3af; --gray-500: #6b7280; --gray-600: #4b5563; --gray-700: #374151; --gray-800: #1f2937; --gray-900: #111827; /* Couleurs de statut */ --success-50: #f0fdf4; --success-100: #dcfce7; --success-500: #22c55e; --success-600: #16a34a; --warning-50: #fffbeb; --warning-100: #fef3c7; --warning-500: #f59e0b; --warning-600: #d97706; --error-50: #fef2f2; --error-100: #fee2e2; --error-500: #ef4444; --error-600: #dc2626; /* Espacements */ --space-1: 0.25rem; --space-2: 0.5rem; --space-3: 0.75rem; --space-4: 1rem; --space-6: 1.5rem; --space-8: 2rem; --space-12: 3rem; /* Border radius */ --radius-sm: 0.375rem; --radius: 0.5rem; --radius-lg: 0.75rem; --radius-xl: 1rem; /* Ombres */ --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05); --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1); --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1); --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1); /* Transitions */ --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1); } /* Reset */ * { margin: 0; padding: 0; box-sizing: border-box; } html { font-size: 16px; -webkit-text-size-adjust: 100%; } body { font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; line-height: 1.6; color: var(--gray-700); background-color: var(--gray-50); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; } /* Layout */ .app { min-height: 100vh; display: flex; flex-direction: column; } .container { max-width: 1200px; margin: 0 auto; padding: 0 var(--space-4); width: 100%; } /* Header */ .header { background: white; border-bottom: 1px solid var(--gray-200); box-shadow: var(--shadow-sm); position: sticky; top: 0; z-index: 100; } .header-content { display: flex; justify-content: space-between; align-items: center; padding: var(--space-4) 0; } .logo h1 { font-size: 1.5rem; font-weight: 700; color: var(--primary-600); margin-bottom: var(--space-1); } .logo p { color: var(--gray-500); font-size: 0.875rem; } .api-status { display: flex; align-items: center; gap: var(--space-2); padding: var(--space-2) var(--space-3); background: var(--gray-50); border-radius: var(--radius); font-size: 0.875rem; font-weight: 500; } .status-indicator { width: 8px; height: 8px; border-radius: 50%; transition: var(--transition); } .status-indicator.online { background: var(--success-500); box-shadow: 0 0 0 2px var(--success-100); } .status-indicator.offline { background: var(--error-500); box-shadow: 0 0 0 2px var(--error-100); } .status-indicator.loading { background: var(--warning-500); box-shadow: 0 0 0 2px var(--warning-100); animation: pulse 2s infinite; } @keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } } /* Système de notifications */ .notification-container { position: fixed; top: var(--space-4); right: var(--space-4); z-index: 1000; max-width: 400px; } .notification { background: white; border-radius: var(--radius-lg); box-shadow: var(--shadow-xl); margin-bottom: var(--space-2); overflow: hidden; transition: all 0.3s ease; border-left: 4px solid; } .notification-info { border-left-color: var(--primary-500); } .notification-success { border-left-color: var(--success-500); } .notification-warning { border-left-color: var(--warning-500); } .notification-error { border-left-color: var(--error-500); } .notification-content { display: flex; align-items: flex-start; padding: var(--space-4); gap: var(--space-3); } .notification-message { flex: 1; font-size: 0.875rem; line-height: 1.5; color: var(--gray-700); } .notification-close { background: none; border: none; color: var(--gray-400); cursor: pointer; font-size: 1.25rem; line-height: 1; padding: 0; width: 20px; height: 20px; display: flex; align-items: center; justify-content: center; border-radius: var(--radius-sm); transition: var(--transition); } .notification-close:hover { color: var(--gray-600); background: var(--gray-100); } /* Détails de l'API */ .api-details { margin-top: var(--space-4); background: var(--success-50); border: 1px solid var(--success-200); border-radius: var(--radius); padding: var(--space-4); animation: slideDown 0.3s ease; } @keyframes slideDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } } .api-details-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--space-3); } .api-details-header h4 { color: var(--success-700); font-size: 0.875rem; font-weight: 600; margin: 0; } .btn-minimal { background: none; border: none; color: var(--gray-500); cursor: pointer; font-size: 1rem; padding: var(--space-1); border-radius: var(--radius-sm); transition: var(--transition); } .btn-minimal:hover { color: var(--gray-700); background: var(--gray-100); } .api-details-content { display: flex; flex-direction: column; gap: var(--space-2); } .detail-item { display: flex; justify-content: space-between; align-items: center; font-size: 0.875rem; } .detail-label { color: var(--gray-600); font-weight: 500; } .detail-value { color: var(--gray-700); font-weight: 400; } .detail-value.success { color: var(--success-600); } /* Améliorations de chargement */ .loading-container { display: flex; align-items: center; gap: var(--space-4); padding: var(--space-6); text-align: center; background: linear-gradient(135deg, var(--primary-50) 0%, var(--gray-50) 100%); border-radius: var(--radius-lg); border: 1px solid var(--primary-100); } .loading-spinner { display: flex; align-items: center; justify-content: center; } .loading-content { flex: 1; text-align: left; } .loading-content h4 { color: var(--primary-700); margin-bottom: var(--space-2); font-size: 1.125rem; } .loading-content p { color: var(--gray-600); font-size: 0.875rem; margin-bottom: var(--space-3); } .loading-progress { background: var(--gray-200); height: 4px; border-radius: 2px; overflow: hidden; } .progress-bar { height: 100%; background: linear-gradient(90deg, var(--primary-500), var(--primary-600)); border-radius: 2px; animation: progressSlide 2s ease-in-out infinite; } @keyframes progressSlide { 0% { transform: translateX(-100%); } 100% { transform: translateX(400%); } } /* Main */ .main { flex: 1; padding: var(--space-8) 0; } /* Configuration */ .config-section { margin-bottom: var(--space-8); } .config-card { background: white; border: 1px solid var(--gray-200); border-radius: var(--radius-xl); padding: var(--space-6); box-shadow: var(--shadow-sm); } .config-card h3 { font-size: 1.125rem; font-weight: 600; color: var(--gray-900); margin-bottom: var(--space-4); } .config-form { display: flex; gap: var(--space-4); align-items: end; } .config-form .input-group { flex: 1; } /* Navigation */ .nav-section { margin-bottom: var(--space-8); } .nav-tabs { display: flex; gap: var(--space-2); background: white; border: 1px solid var(--gray-200); border-radius: var(--radius-xl); padding: var(--space-1); box-shadow: var(--shadow-sm); overflow-x: auto; } .nav-tab { flex: 1; min-width: 120px; display: flex; align-items: center; justify-content: center; gap: var(--space-2); padding: var(--space-3) var(--space-4); border: none; background: transparent; border-radius: var(--radius-lg); cursor: pointer; font-weight: 500; font-size: 0.875rem; color: var(--gray-600); transition: var(--transition); white-space: nowrap; } .nav-tab:hover { background: var(--gray-50); color: var(--gray-900); } .nav-tab.active { background: var(--primary-500); color: white; box-shadow: var(--shadow); } .tab-icon { font-size: 1rem; } /* Content */ .tab-contents { position: relative; } .tab-content { display: none; } .tab-content.active { display: block; animation: fadeIn 0.3s ease-out; } @keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } } .content-card { background: white; border: 1px solid var(--gray-200); border-radius: var(--radius-xl); box-shadow: var(--shadow-sm); overflow: hidden; } .card-header { padding: var(--space-6); border-bottom: 1px solid var(--gray-200); background: var(--gray-50); } .card-header h2 { font-size: 1.25rem; font-weight: 600; color: var(--gray-900); margin-bottom: var(--space-2); } .card-header p { color: var(--gray-600); margin: 0; } /* Forms */ .form { padding: var(--space-6); } .form-group { margin-bottom: var(--space-6); } .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); } .input-group { display: flex; flex-direction: column; } label { display: block; font-weight: 500; color: var(--gray-700); margin-bottom: var(--space-2); font-size: 0.875rem; } input, textarea, select { width: 100%; padding: var(--space-3) var(--space-4); border: 1px solid var(--gray-300); border-radius: var(--radius); font-size: 0.875rem; color: var(--gray-700); background: white; transition: var(--transition); } input:focus, textarea:focus, select:focus { outline: none; border-color: var(--primary-500); box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1); } textarea { resize: vertical; min-height: 100px; } select { cursor: pointer; } .form-actions { display: flex; gap: var(--space-3); justify-content: flex-end; margin-top: var(--space-6); } /* Buttons */ .btn { display: inline-flex; align-items: center; gap: var(--space-2); padding: var(--space-3) var(--space-4); border: 1px solid transparent; border-radius: var(--radius); font-weight: 500; font-size: 0.875rem; text-decoration: none; cursor: pointer; transition: var(--transition); white-space: nowrap; } .btn:disabled { opacity: 0.6; cursor: not-allowed; } .btn-primary { background: var(--primary-500); color: white; border-color: var(--primary-500); } .btn-primary:hover:not(:disabled) { background: var(--primary-600); border-color: var(--primary-600); transform: translateY(-1px); box-shadow: var(--shadow); } .btn-secondary { background: white; color: var(--gray-700); border-color: var(--gray-300); } .btn-secondary:hover:not(:disabled) { background: var(--gray-50); border-color: var(--gray-400); } .btn-icon { font-size: 1rem; } /* Results */ .result-container { margin-top: var(--space-6); display: none; } .result-container.show { display: block; animation: fadeIn 0.3s ease-out; } .result-card { border: 1px solid var(--gray-200); border-radius: var(--radius-lg); overflow: hidden; } .result-header { display: flex; align-items: center; gap: var(--space-2); padding: var(--space-4); font-weight: 600; font-size: 0.875rem; } .result-header.success { background: var(--success-50); color: var(--success-600); border-bottom: 1px solid var(--success-100); } .result-header.error { background: var(--error-50); color: var(--error-600); border-bottom: 1px solid var(--error-100); } .result-content { padding: var(--space-4); background: white; } .result-json { background: var(--gray-50); border: 1px solid var(--gray-200); border-radius: var(--radius); padding: var(--space-4); font-family: "Monaco", "Menlo", "Ubuntu Mono", monospace; font-size: 0.8rem; line-height: 1.5; white-space: pre-wrap; overflow-x: auto; color: var(--gray-700); } /* Badges et entités */ .badge { display: inline-flex; align-items: center; padding: var(--space-1) var(--space-2); border-radius: var(--radius-sm); font-size: 0.75rem; font-weight: 500; margin: var(--space-1); } .badge.positive { background: var(--success-100); color: var(--success-600); } .badge.negative { background: var(--error-100); color: var(--error-600); } .badge.neutral { background: var(--gray-100); color: var(--gray-600); } .entity { display: inline-flex; align-items: center; padding: var(--space-1) var(--space-2); border-radius: var(--radius-sm); font-size: 0.75rem; font-weight: 500; margin: var(--space-1); } .entity.person { background: rgba(59, 130, 246, 0.1); color: #1d4ed8; } .entity.org { background: rgba(245, 158, 11, 0.1); color: #b45309; } .entity.loc { background: rgba(34, 197, 94, 0.1); color: #15803d; } .entity.misc { background: rgba(168, 85, 247, 0.1); color: #7c3aed; } /* Batch results */ .batch-results { display: grid; gap: var(--space-4); } .batch-item { background: var(--gray-50); border: 1px solid var(--gray-200); border-radius: var(--radius); padding: var(--space-4); } .batch-item-header { font-weight: 500; color: var(--gray-900); margin-bottom: var(--space-2); font-size: 0.875rem; } /* Loading */ .loading { display: flex; flex-direction: column; align-items: center; padding: var(--space-8); color: var(--gray-500); } .spinner { width: 32px; height: 32px; border: 3px solid var(--gray-200); border-top: 3px solid var(--primary-500); border-radius: 50%; animation: spin 1s linear infinite; margin-bottom: var(--space-4); } @keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } } /* Responsive */ @media (max-width: 768px) { .container { padding: 0 var(--space-3); } .header-content { flex-direction: column; gap: var(--space-4); text-align: center; } .nav-tabs { flex-wrap: wrap; } .nav-tab { flex: none; min-width: auto; } .form-row { grid-template-columns: 1fr; } .config-form { flex-direction: column; } .form-actions { flex-direction: column-reverse; } .btn { justify-content: center; } } @media (max-width: 480px) { .container { padding: 0 var(--space-2); } .main { padding: var(--space-4) 0; } .config-card, .content-card .form, .card-header { padding: var(--space-4); } } /* Styles pour les résultats améliorés */ .result-header { display: flex; justify-content: space-between; align-items: flex-start; padding: var(--space-4); border-bottom: 1px solid var(--gray-200); } .result-header.success { background: linear-gradient(135deg, var(--success-50) 0%, var(--success-100) 100%); color: var(--success-800); } .result-header.error { background: linear-gradient(135deg, var(--error-50) 0%, var(--error-100) 100%); color: var(--error-800); } .result-header-main { display: flex; align-items: center; gap: var(--space-3); } .result-icon { font-size: 1.25rem; } .result-title .title { font-weight: 600; font-size: 1rem; display: block; } .result-title .timestamp { font-size: 0.75rem; opacity: 0.7; display: block; margin-top: 2px; } .result-actions { display: flex; gap: var(--space-1); } .result-content { padding: var(--space-4); } /* Sentiment result styles */ .sentiment-result { display: flex; flex-direction: column; gap: var(--space-4); } .sentiment-main { display: flex; flex-direction: column; gap: var(--space-3); } .sentiment-label { display: flex; align-items: center; gap: var(--space-3); } .label-title { font-weight: 600; color: var(--gray-700); } .confidence-section { display: flex; flex-direction: column; gap: var(--space-2); } .confidence-header { display: flex; justify-content: space-between; align-items: center; } .confidence-title { font-weight: 600; color: var(--gray-700); font-size: 0.875rem; } .confidence-value { font-weight: 700; color: var(--primary-600); } .confidence-bar { background: var(--gray-200); height: 8px; border-radius: 4px; overflow: hidden; } .confidence-progress { height: 100%; border-radius: 4px; transition: width 0.6s ease; } .interpretation { background: var(--gray-50); padding: var(--space-3); border-radius: var(--radius); border-left: 3px solid var(--primary-500); font-style: italic; color: var(--gray-700); } /* NER result styles */ .ner-result { display: flex; flex-direction: column; gap: var(--space-4); } .entities-container { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-2); } .entity-item { display: flex; align-items: center; gap: var(--space-2); background: var(--gray-50); padding: var(--space-2) var(--space-3); border-radius: var(--radius); border: 1px solid var(--gray-200); } .entity { font-weight: 600; padding: var(--space-1) var(--space-2); border-radius: var(--radius-sm); font-size: 0.875rem; } .entity.person { background: var(--primary-100); color: var(--primary-800); } .entity.per { background: var(--primary-100); color: var(--primary-800); } .entity.organization { background: var(--warning-100); color: var(--warning-800); } .entity.org { background: var(--warning-100); color: var(--warning-800); } .entity.location { background: var(--success-100); color: var(--success-800); } .entity.loc { background: var(--success-100); color: var(--success-800); } .entity.misc { background: var(--gray-100); color: var(--gray-800); } .entity-label { font-size: 0.75rem; color: var(--gray-600); font-weight: 500; } .entity-confidence { font-size: 0.75rem; color: var(--gray-500); } .entities-stats { background: var(--gray-50); padding: var(--space-3); border-radius: var(--radius); } .stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: var(--space-2); margin-top: var(--space-2); } .stat-item { display: flex; justify-content: space-between; align-items: center; padding: var(--space-2); background: white; border-radius: var(--radius-sm); font-size: 0.875rem; } .stat-type { font-weight: 500; color: var(--gray-700); } .stat-count { font-weight: 700; color: var(--primary-600); } .no-entities { text-align: center; color: var(--gray-500); font-style: italic; padding: var(--space-4); background: var(--gray-50); border-radius: var(--radius); } /* QA result styles */ .qa-result { display: flex; flex-direction: column; gap: var(--space-4); } .qa-question, .qa-answer { background: var(--gray-50); padding: var(--space-3); border-radius: var(--radius); } .qa-question h4, .qa-answer h4 { margin-bottom: var(--space-2); color: var(--gray-700); font-size: 0.875rem; font-weight: 600; } .question-text { color: var(--gray-800); font-weight: 500; } .answer-text { color: var(--gray-800); font-weight: 500; background: white; padding: var(--space-3); border-radius: var(--radius-sm); border-left: 3px solid var(--primary-500); } .qa-confidence { display: flex; flex-direction: column; gap: var(--space-2); } /* Fillmask result styles */ .fillmask-result { display: flex; flex-direction: column; gap: var(--space-4); } .predictions-container { display: flex; flex-direction: column; gap: var(--space-2); margin-top: var(--space-2); } .prediction-item { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-3); background: var(--gray-50); border-radius: var(--radius); border: 1px solid var(--gray-200); } .prediction-item.rank-first { background: linear-gradient(135deg, var(--success-50) 0%, var(--success-100) 100%); border-color: var(--success-200); } .prediction-item.rank-second { background: linear-gradient(135deg, var(--warning-50) 0%, var(--warning-100) 100%); border-color: var(--warning-200); } .prediction-rank { font-weight: 700; color: var(--primary-600); font-size: 0.875rem; min-width: 24px; } .prediction-content { flex: 1; display: flex; justify-content: space-between; align-items: center; } .prediction-token { font-weight: 600; color: var(--gray-800); } .prediction-score { font-weight: 500; color: var(--gray-600); font-size: 0.875rem; } .prediction-bar { flex: 1; background: var(--gray-200); height: 4px; border-radius: 2px; margin-left: var(--space-3); overflow: hidden; } .prediction-progress { height: 100%; background: var(--primary-500); border-radius: 2px; transition: width 0.6s ease; } .no-predictions { text-align: center; color: var(--gray-500); font-style: italic; padding: var(--space-4); background: var(--gray-50); border-radius: var(--radius); } /* Moderation result styles */ .moderation-result { display: flex; flex-direction: column; gap: var(--space-4); } .moderation-status { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-4); border-radius: var(--radius); font-weight: 600; } .moderation-status.positive { background: linear-gradient(135deg, var(--success-50) 0%, var(--success-100) 100%); color: var(--success-800); border: 1px solid var(--success-200); } .moderation-status.negative { background: linear-gradient(135deg, var(--error-50) 0%, var(--error-100) 100%); color: var(--error-800); border: 1px solid var(--error-200); } .status-icon { font-size: 1.25rem; } .moderation-details { background: var(--gray-50); padding: var(--space-3); border-radius: var(--radius); } .moderation-categories { display: flex; flex-direction: column; gap: var(--space-2); margin-top: var(--space-2); } .category-item { display: flex; justify-content: space-between; align-items: center; padding: var(--space-2); background: white; border-radius: var(--radius-sm); font-size: 0.875rem; } .category-label { font-weight: 500; color: var(--gray-700); } .category-value { font-weight: 600; color: var(--gray-800); } /* Text generation result styles */ .textgen-result { display: flex; flex-direction: column; gap: var(--space-4); } .textgen-prompt { background: var(--gray-50); padding: var(--space-3); border-radius: var(--radius); } .textgen-prompt h4 { margin-bottom: var(--space-2); color: var(--gray-700); font-size: 0.875rem; font-weight: 600; } .prompt-text { color: var(--gray-800); font-style: italic; } .textgen-output { background: var(--primary-50); padding: var(--space-3); border-radius: var(--radius); border: 1px solid var(--primary-200); } .textgen-output h4 { margin-bottom: var(--space-2); color: var(--primary-700); font-size: 0.875rem; font-weight: 600; } .generated-text { background: white; padding: var(--space-4); border-radius: var(--radius-sm); border-left: 3px solid var(--primary-500); } .text-content { color: var(--gray-800); line-height: 1.7; margin-bottom: var(--space-3); } .text-actions { display: flex; gap: var(--space-2); justify-content: flex-end; } /* Error result styles */ .error-content { display: flex; flex-direction: column; gap: var(--space-3); } .error-message { background: var(--error-50); padding: var(--space-3); border-radius: var(--radius); border-left: 3px solid var(--error-500); } .error-message strong { color: var(--error-700); display: block; margin-bottom: var(--space-1); } .error-message p { color: var(--error-800); margin: 0; } .error-suggestions { background: var(--warning-50); padding: var(--space-3); border-radius: var(--radius); border-left: 3px solid var(--warning-500); } .error-suggestions h4 { color: var(--warning-700); margin-bottom: var(--space-2); font-size: 0.875rem; } .error-suggestions ul { margin: 0; padding-left: var(--space-4); } .error-suggestions li { color: var(--warning-800); margin-bottom: var(--space-1); font-size: 0.875rem; } /* Détails techniques */ .result-details { margin-top: var(--space-3); border: 1px solid var(--gray-200); border-radius: var(--radius); } .result-details summary { padding: var(--space-3); background: var(--gray-50); cursor: pointer; font-weight: 500; color: var(--gray-700); font-size: 0.875rem; border-radius: var(--radius); } .result-details summary:hover { background: var(--gray-100); } .result-details[open] summary { border-bottom: 1px solid var(--gray-200); border-radius: var(--radius) var(--radius) 0 0; } .result-json { padding: var(--space-3); background: var(--gray-900); color: var(--gray-100); font-family: "Courier New", monospace; font-size: 0.75rem; white-space: pre-wrap; overflow-x: auto; border-radius: 0 0 var(--radius) var(--radius); } /* Loading states */ .btn.loading { position: relative; color: transparent !important; } .btn.loading::after { content: ""; position: absolute; top: 50%; left: 50%; width: 16px; height: 16px; margin-top: -8px; margin-left: -8px; border: 2px solid transparent; border-top: 2px solid currentColor; border-radius: 50%; animation: spin 1s linear infinite; } @keyframes spin { to { transform: rotate(360deg); } }