Trabis commited on
Commit
1c437f6
·
verified ·
1 Parent(s): f5967ac

Update static/style.css

Browse files
Files changed (1) hide show
  1. static/style.css +219 -0
static/style.css CHANGED
@@ -0,0 +1,219 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* Variables de couleur (style ChatGPT sombre) */
2
+ :root {
3
+ --bg-color-dark: #212121; /* Fond très sombre */
4
+ --bg-color-medium: #343541; /* Fond principal du chat */
5
+ --bg-color-light: #444654; /* Fond des messages assistant */
6
+ --user-msg-bg: #502963; /* Fond des messages utilisateur (violet foncé) */
7
+ --text-color-primary: #ececf1; /* Texte principal (presque blanc) */
8
+ --text-color-secondary: #b4b4b4; /* Texte secondaire (gris clair) */
9
+ --border-color: #565869; /* Couleur des bordures subtiles */
10
+ --accent-color: #10a37f; /* Vert ChatGPT (pourrait être utilisé pour les boutons/liens) */
11
+ --input-bg: #40414f; /* Fond de la zone de saisie */
12
+ }
13
+
14
+ /* Réinitialisation et style de base */
15
+ *, *::before, *::after {
16
+ box-sizing: border-box;
17
+ margin: 0;
18
+ padding: 0;
19
+ }
20
+
21
+ html {
22
+ font-size: 16px; /* Taille de base */
23
+ height: 100%;
24
+ }
25
+
26
+ body {
27
+ font-family: /*"Noto Kufi Arabic",*/ system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
28
+ background-color: var(--bg-color-dark);
29
+ color: var(--text-color-primary);
30
+ line-height: 1.6;
31
+ direction: rtl; /* Direction droite-à-gauche */
32
+ display: flex;
33
+ justify-content: center;
34
+ align-items: center;
35
+ min-height: 100vh;
36
+ padding: 10px; /* Un peu d'espace sur les petits écrans */
37
+ }
38
+
39
+ /* Conteneur principal du chat */
40
+ .chat-container {
41
+ width: 100%;
42
+ max-width: 800px; /* Limite la largeur sur les grands écrans */
43
+ height: 90vh; /* Prend la majeure partie de la hauteur */
44
+ background-color: var(--bg-color-medium);
45
+ border-radius: 8px;
46
+ box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
47
+ display: flex;
48
+ flex-direction: column;
49
+ overflow: hidden; /* Cache le contenu qui dépasse */
50
+ }
51
+
52
+ /* En-tête */
53
+ header {
54
+ padding: 15px 20px;
55
+ background-color: rgba(0, 0, 0, 0.1); /* Légèrement différent */
56
+ border-bottom: 1px solid var(--border-color);
57
+ }
58
+
59
+ header h1 {
60
+ font-size: 1.2rem;
61
+ font-weight: 600;
62
+ text-align: center;
63
+ color: var(--text-color-primary);
64
+ }
65
+
66
+ /* Zone d'affichage des messages */
67
+ .chatbox {
68
+ flex-grow: 1; /* Prend l'espace vertical restant */
69
+ overflow-y: auto; /* Active le défilement vertical */
70
+ padding: 20px;
71
+ display: flex;
72
+ flex-direction: column;
73
+ }
74
+
75
+ /* Style commun des messages */
76
+ .message {
77
+ padding: 12px 18px;
78
+ margin-bottom: 12px;
79
+ border-radius: 18px;
80
+ max-width: 85%; /* Empêche les messages d'être trop larges */
81
+ word-wrap: break-word; /* Coupe les mots longs */
82
+ position: relative; /* Pour les futurs éléments comme les réactions ? */
83
+ }
84
+
85
+ /* Style des messages de l'assistant (IA) */
86
+ .assistant-message {
87
+ background-color: var(--bg-color-light);
88
+ color: var(--text-color-primary);
89
+ border-bottom-right-radius: 4px; /* Petit détail de style */
90
+ margin-left: auto; /* Pousse vers la droite (début en RTL) */
91
+ margin-right: 0;
92
+ }
93
+
94
+ /* Style des messages de l'utilisateur */
95
+ .user-message {
96
+ background-color: var(--user-msg-bg);
97
+ color: var(--text-color-primary);
98
+ border-bottom-left-radius: 4px; /* Petit détail de style */
99
+ margin-right: auto; /* Pousse vers la gauche (fin en RTL) */
100
+ margin-left: 0;
101
+ }
102
+
103
+ /* Pied de page contenant la zone de saisie */
104
+ footer {
105
+ padding: 15px 20px;
106
+ border-top: 1px solid var(--border-color);
107
+ background-color: rgba(0, 0, 0, 0.1);
108
+ }
109
+
110
+ .input-area {
111
+ display: flex;
112
+ align-items: center; /* Aligne verticalement textarea et bouton */
113
+ background-color: var(--input-bg);
114
+ border-radius: 12px;
115
+ padding: 5px 5px 5px 15px; /* Ajustement padding pour RTL */
116
+ box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
117
+ }
118
+
119
+ /* Zone de texte pour la saisie */
120
+ #message-input {
121
+ flex-grow: 1; /* Prend l'espace horizontal restant */
122
+ border: none;
123
+ outline: none;
124
+ background-color: transparent; /* Hérite du fond de .input-area */
125
+ color: var(--text-color-primary);
126
+ font-family: inherit;
127
+ font-size: 1rem;
128
+ padding: 10px;
129
+ resize: none; /* Empêche le redimensionnement manuel */
130
+ max-height: 150px; /* Limite la hauteur maximale */
131
+ overflow-y: auto; /* Défilement si le texte dépasse */
132
+ direction: rtl; /* Assure la direction du texte */
133
+ text-align: right;
134
+ }
135
+
136
+ #message-input::placeholder {
137
+ color: var(--text-color-secondary);
138
+ text-align: right;
139
+ }
140
+
141
+ /* Bouton d'envoi */
142
+ #send-button {
143
+ background-color: transparent;
144
+ border: none;
145
+ padding: 8px;
146
+ margin-right: 8px; /* Espace à droite du bouton en RTL */
147
+ cursor: pointer;
148
+ color: var(--text-color-secondary); /* Couleur de l'icône */
149
+ border-radius: 8px;
150
+ display: flex;
151
+ justify-content: center;
152
+ align-items: center;
153
+ transition: background-color 0.2s ease, color 0.2s ease;
154
+ }
155
+
156
+ #send-button:hover {
157
+ background-color: rgba(255, 255, 255, 0.1);
158
+ color: var(--text-color-primary);
159
+ }
160
+
161
+ #send-button:disabled {
162
+ cursor: not-allowed;
163
+ opacity: 0.5;
164
+ }
165
+
166
+ #send-button svg {
167
+ width: 20px;
168
+ height: 20px;
169
+ }
170
+
171
+ /* Petit texte en bas */
172
+ .footer-text {
173
+ font-size: 0.75rem;
174
+ color: var(--text-color-secondary);
175
+ text-align: center;
176
+ margin-top: 10px;
177
+ }
178
+
179
+ /* Style de la barre de défilement (pour les navigateurs Webkit) */
180
+ .chatbox::-webkit-scrollbar {
181
+ width: 8px;
182
+ }
183
+
184
+ .chatbox::-webkit-scrollbar-track {
185
+ background: var(--bg-color-medium);
186
+ border-radius: 4px;
187
+ }
188
+
189
+ .chatbox::-webkit-scrollbar-thumb {
190
+ background-color: var(--border-color);
191
+ border-radius: 4px;
192
+ border: 2px solid var(--bg-color-medium); /* Crée un effet de bordure */
193
+ }
194
+
195
+ .chatbox::-webkit-scrollbar-thumb:hover {
196
+ background-color: var(--accent-color);
197
+ }
198
+
199
+ /* --- Style pour les blocs de code (si le LLM en génère) --- */
200
+ /* Le JS devra encapsuler le code dans <pre><code>...</code></pre> */
201
+ .message pre {
202
+ background-color: rgba(0, 0, 0, 0.3); /* Fond sombre pour le code */
203
+ padding: 15px;
204
+ border-radius: 8px;
205
+ overflow-x: auto; /* Défilement horizontal si le code est large */
206
+ margin-top: 10px;
207
+ margin-bottom: 5px;
208
+ border: 1px solid var(--border-color);
209
+ }
210
+
211
+ .message code {
212
+ font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
213
+ font-size: 0.9rem;
214
+ color: var(--text-color-primary); /* Ou une couleur spécifique pour le code */
215
+ direction: ltr; /* Le code est généralement LTR */
216
+ text-align: left;
217
+ display: block; /* Assure que le bloc prend la largeur */
218
+ white-space: pre; /* Préserve les espaces et sauts de ligne */
219
+ }