Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -24,105 +24,160 @@ st.set_page_config(
|
|
24 |
# Style CSS personnalisé
|
25 |
st.markdown("""
|
26 |
<style>
|
27 |
-
/*
|
28 |
.main {
|
29 |
-
background-color: #
|
|
|
30 |
}
|
31 |
|
32 |
-
/*
|
33 |
-
|
34 |
-
background: linear-gradient(
|
35 |
color: white;
|
|
|
|
|
|
|
|
|
36 |
}
|
37 |
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
font-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
42 |
}
|
43 |
|
44 |
-
/*
|
45 |
.stMetric {
|
46 |
-
background
|
47 |
border-radius: 10px;
|
48 |
-
padding:
|
49 |
-
box-shadow: 0
|
50 |
border-left: 4px solid #003366;
|
|
|
51 |
}
|
52 |
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
color:
|
57 |
-
border-radius: 5px;
|
58 |
-
border: none;
|
59 |
-
padding: 8px 16px;
|
60 |
-
font-weight: 500;
|
61 |
}
|
62 |
|
63 |
-
.
|
64 |
-
|
65 |
-
color:
|
66 |
}
|
67 |
|
68 |
-
/*
|
69 |
[data-baseweb="tab-list"] {
|
70 |
-
gap:
|
|
|
71 |
}
|
72 |
|
73 |
[data-baseweb="tab"] {
|
74 |
-
background
|
75 |
-
border-radius: 8px
|
76 |
padding: 10px 20px !important;
|
|
|
|
|
|
|
77 |
}
|
78 |
|
79 |
[aria-selected="true"] {
|
80 |
-
background
|
81 |
color: white !important;
|
|
|
82 |
}
|
83 |
|
84 |
-
/*
|
85 |
-
.
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
border: 1px solid #ced4da !important;
|
91 |
}
|
92 |
|
93 |
-
/*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
94 |
.stDataFrame {
|
95 |
-
border-radius:
|
96 |
-
box-shadow: 0 2px
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
97 |
}
|
98 |
|
99 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
100 |
.footer {
|
101 |
-
|
102 |
-
bottom: 0;
|
103 |
-
width: 100%;
|
104 |
-
background-color: #003366;
|
105 |
color: white;
|
|
|
106 |
text-align: center;
|
107 |
-
|
108 |
-
|
|
|
109 |
}
|
110 |
|
111 |
-
/*
|
112 |
:root {
|
113 |
-
--beac-
|
114 |
-
--beac-
|
115 |
-
--beac-
|
|
|
|
|
116 |
}
|
117 |
|
118 |
-
/*
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
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)
|