Arvador237 commited on
Commit
b39c930
·
verified ·
1 Parent(s): c36170a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +113 -58
app.py CHANGED
@@ -24,105 +24,160 @@ st.set_page_config(
24
  # Style CSS personnalisé
25
  st.markdown("""
26
  <style>
27
- /* Fond principal */
28
  .main {
29
- background-color: #f8f9fa;
 
30
  }
31
 
32
- /* Sidebar */
33
- [data-testid="stSidebar"] {
34
- background: linear-gradient(180deg, #003366 0%, #002244 100%);
35
  color: white;
 
 
 
 
36
  }
37
 
38
- /* Titres */
39
- h1, h2, h3, h4, h5, h6 {
40
- color: #003366 !important;
41
- font-family: 'Helvetica Neue', sans-serif;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
42
  }
43
 
44
- /* Cartes de métriques */
45
  .stMetric {
46
- background-color: white;
47
  border-radius: 10px;
48
- padding: 15px;
49
- box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
50
  border-left: 4px solid #003366;
 
51
  }
52
 
53
- /* Boutons */
54
- .stButton>button {
55
- background-color: #003366;
56
- color: white;
57
- border-radius: 5px;
58
- border: none;
59
- padding: 8px 16px;
60
- font-weight: 500;
61
  }
62
 
63
- .stButton>button:hover {
64
- background-color: #002244;
65
- color: white;
66
  }
67
 
68
- /* Onglets */
69
  [data-baseweb="tab-list"] {
70
- gap: 10px;
 
71
  }
72
 
73
  [data-baseweb="tab"] {
74
- background-color: #e9ecef;
75
- border-radius: 8px 8px 0 0 !important;
76
  padding: 10px 20px !important;
 
 
 
77
  }
78
 
79
  [aria-selected="true"] {
80
- background-color: #003366 !important;
81
  color: white !important;
 
82
  }
83
 
84
- /* Inputs */
85
- .stTextInput>div>div>input,
86
- .stNumberInput>div>div>input,
87
- .stSelectbox>div>div>select,
88
- .stDateInput>div>div>input {
89
- border-radius: 5px !important;
90
- border: 1px solid #ced4da !important;
91
  }
92
 
93
- /* Tableaux */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
94
  .stDataFrame {
95
- border-radius: 8px;
96
- box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
 
 
 
 
 
 
 
 
97
  }
98
 
99
- /* Footer */
 
 
 
 
 
 
 
 
100
  .footer {
101
- position: fixed;
102
- bottom: 0;
103
- width: 100%;
104
- background-color: #003366;
105
  color: white;
 
106
  text-align: center;
107
- padding: 10px;
108
- font-size: 0.8rem;
 
109
  }
110
 
111
- /* Couleurs spécifiques BEAC */
112
  :root {
113
- --beac-blue: #003366;
114
- --beac-gold: #D4AF37;
115
- --beac-light: #f0f4f7;
 
 
116
  }
117
 
118
- /* En-tête personnalisé */
119
- .header {
120
- background: linear-gradient(90deg, #003366 0%, #004080 100%);
121
- color: white;
122
- padding: 1rem;
123
- border-radius: 0 0 10px 10px;
124
- margin-bottom: 2rem;
125
- box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
126
  }
127
  </style>
128
  """, unsafe_allow_html=True)
 
24
  # Style CSS personnalisé
25
  st.markdown("""
26
  <style>
27
+ /* ========== FOND ET STRUCTURE GÉNÉRALE ========== */
28
  .main {
29
+ background-color: #f5f7fa;
30
+ font-family: 'Helvetica Neue', Arial, sans-serif;
31
  }
32
 
33
+ /* ========== EN-TÊTE ========== */
34
+ .header {
35
+ background: linear-gradient(135deg, #003366 0%, #002244 100%);
36
  color: white;
37
+ padding: 1.5rem;
38
+ border-radius: 0 0 15px 15px;
39
+ margin-bottom: 2rem;
40
+ box-shadow: 0 4px 12px rgba(0, 51, 102, 0.15);
41
  }
42
 
43
+ .header h1 {
44
+ font-weight: 700;
45
+ margin-bottom: 0.5rem;
46
+ font-size: 1.8rem;
47
+ }
48
+
49
+ .header p {
50
+ opacity: 0.9;
51
+ font-size: 1rem;
52
+ }
53
+
54
+ /* ========== SIDEBAR ========== */
55
+ [data-testid="stSidebar"] {
56
+ background: linear-gradient(180deg, #003366 0%, #002244 100%) !important;
57
+ padding-top: 2rem;
58
+ }
59
+
60
+ .sidebar .sidebar-content {
61
+ color: white;
62
  }
63
 
64
+ /* ========== CARTES DE MÉTRIQUES ========== */
65
  .stMetric {
66
+ background: white;
67
  border-radius: 10px;
68
+ padding: 1.5rem;
69
+ box-shadow: 0 2px 8px rgba(0, 51, 102, 0.1);
70
  border-left: 4px solid #003366;
71
+ margin-bottom: 1.5rem;
72
  }
73
 
74
+ .stMetric > div > div {
75
+ font-size: 1.8rem !important;
76
+ font-weight: 600;
77
+ color: #003366 !important;
 
 
 
 
78
  }
79
 
80
+ .stMetric > div > label {
81
+ font-size: 0.9rem !important;
82
+ color: #555 !important;
83
  }
84
 
85
+ /* ========== ONGLETS ========== */
86
  [data-baseweb="tab-list"] {
87
+ gap: 5px;
88
+ padding: 0 1rem;
89
  }
90
 
91
  [data-baseweb="tab"] {
92
+ background: #e9ecef !important;
93
+ border-radius: 8px !important;
94
  padding: 10px 20px !important;
95
+ margin: 0 2px !important;
96
+ font-weight: 500;
97
+ transition: all 0.3s ease;
98
  }
99
 
100
  [aria-selected="true"] {
101
+ background: #003366 !important;
102
  color: white !important;
103
+ box-shadow: 0 2px 5px rgba(0, 51, 102, 0.2);
104
  }
105
 
106
+ /* ========== GRAPHIQUES ========== */
107
+ .stPlotlyChart {
108
+ border-radius: 12px;
109
+ box-shadow: 0 4px 12px rgba(0, 51, 102, 0.1);
110
+ background: white;
111
+ padding: 1rem;
 
112
  }
113
 
114
+ /* ========== BOUTONS ========== */
115
+ .stButton > button {
116
+ background-color: #003366;
117
+ color: white;
118
+ border-radius: 6px;
119
+ border: none;
120
+ padding: 0.7rem 1.5rem;
121
+ font-weight: 500;
122
+ transition: all 0.3s ease;
123
+ }
124
+
125
+ .stButton > button:hover {
126
+ background-color: #002244;
127
+ transform: translateY(-1px);
128
+ box-shadow: 0 2px 8px rgba(0, 51, 102, 0.2);
129
+ }
130
+
131
+ /* ========== TABLEAUX ========== */
132
  .stDataFrame {
133
+ border-radius: 10px;
134
+ box-shadow: 0 2px 8px rgba(0, 51, 102, 0.1);
135
+ }
136
+
137
+ /* ========== EXPANDERS ========== */
138
+ .stExpander {
139
+ background: white;
140
+ border-radius: 10px;
141
+ box-shadow: 0 2px 8px rgba(0, 51, 102, 0.1);
142
+ margin-bottom: 1.5rem;
143
  }
144
 
145
+ .stExpander > details > summary {
146
+ background: #003366 !important;
147
+ color: white !important;
148
+ padding: 1rem !important;
149
+ border-radius: 8px !important;
150
+ font-weight: 600;
151
+ }
152
+
153
+ /* ========== FOOTER ========== */
154
  .footer {
155
+ background: #003366;
 
 
 
156
  color: white;
157
+ padding: 1rem;
158
  text-align: center;
159
+ margin-top: 3rem;
160
+ border-radius: 8px 8px 0 0;
161
+ font-size: 0.85rem;
162
  }
163
 
164
+ /* ========== COULEURS THÉMATIQUES ========== */
165
  :root {
166
+ --beac-primary: #003366;
167
+ --beac-secondary: #D4AF37;
168
+ --beac-accent: #8BBEFF;
169
+ --beac-success: #28a745;
170
+ --beac-danger: #dc3545;
171
  }
172
 
173
+ /* ========== ANIMATIONS ========== */
174
+ @keyframes fadeIn {
175
+ from { opacity: 0; transform: translateY(10px); }
176
+ to { opacity: 1; transform: translateY(0); }
177
+ }
178
+
179
+ .stMetric, .stPlotlyChart, .stDataFrame {
180
+ animation: fadeIn 0.5s ease-out;
181
  }
182
  </style>
183
  """, unsafe_allow_html=True)