FAYCEL75's picture
Update ui_style.py
5ac5fea verified
import streamlit as st
def apply_global_style():
# Page config (protégée pour multipage)
try:
st.set_page_config(
page_title="GetAround – Executive Analytics",
page_icon="🚗",
layout="wide",
)
except:
pass
# Thème sombre + style exécutif
st.markdown(
"""
<style>
html, body, [class*="css"] {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
background-color: #020617;
color: #e5e7eb;
}
h1, h2, h3 {
font-weight: 700 !important;
color: #e5e7eb;
}
h1 {
font-size: 2rem;
}
.logo-bar {
display: flex;
justify-content: space-between;
align-items: center;
padding: 8px 14px;
border-radius: 999px;
background: linear-gradient(90deg, #0f172a, #1d4ed8);
margin-bottom: 10px;
box-shadow: 0 8px 20px rgba(15,23,42,0.5);
}
.logo-bar-title {
font-size: 0.9rem;
letter-spacing: 0.08em;
text-transform: uppercase;
color: #e5e7eb;
}
.logo-bar-right {
font-size: 0.8rem;
color: #cbd5f5;
}
.kpi-card {
background-color: #020617;
padding: 14px 18px;
border-radius: 12px;
border: 1px solid #1f2937;
box-shadow: 0 1px 4px rgba(15,23,42,0.7);
}
.kpi-label {
font-size: 0.85rem;
color: #9ca3af;
}
.kpi-value {
font-size: 1.6rem;
font-weight: 720;
margin-top: 4px;
color: #f9fafb;
}
.kpi-status-optimal {
color: #22c55e;
font-weight: 600;
}
.kpi-status-acceptable {
color: #f97316;
font-weight: 600;
}
.kpi-status-risky {
color: #f97373;
font-weight: 600;
}
.info-panel {
background-color: #020617;
padding: 12px 16px;
border-radius: 10px;
border: 1px solid #1f2937;
font-size: 0.9rem;
color: #e5e7eb;
}
.footer {
font-size: 0.78rem;
color: #6b7280;
margin-top: 40px;
padding-top: 8px;
border-top: 1px solid #1f2937;
}
.executive-badge {
display: inline-block;
padding: 3px 8px;
border-radius: 999px;
background-color: #0f172a;
color: #e5e7eb;
font-size: 0.72rem;
text-transform: uppercase;
letter-spacing: 0.08em;
margin-bottom: 6px;
}
.price-card {
background: radial-gradient(circle at top left, #1d4ed8, #020617);
color: #f9fafb;
padding: 20px 24px;
border-radius: 20px;
box-shadow: 0 16px 40px rgba(15,23,42,0.9);
margin-top: 10px;
}
.price-amount {
font-size: 2.6rem;
font-weight: 750;
letter-spacing: 0.03em;
}
.price-badge {
display: inline-block;
padding: 3px 10px;
border-radius: 999px;
background-color: rgba(15,23,42,0.85);
font-size: 0.72rem;
text-transform: uppercase;
letter-spacing: 0.08em;
margin-bottom: 6px;
}
.price-sub {
font-size: 0.9rem;
color: #e5e7eb;
}
.mlops-card {
background-color: #d4ffd4;
border-radius: 16px;
padding: 16px 18px;
border: 1px solid #1f2937;
box-shadow: 0 10px 30px rgba(15,23,42,0.8);
}
.mlops-step {
font-size: 0.9rem;
margin-bottom: 6px;
}
.mlops-step b {
color: #0f172a;
}
</style>
""",
unsafe_allow_html=True,
)
# Bandeau logos
st.markdown(
"""
<div class="logo-bar">
<div class="logo-bar-title">GETAROUND · JEDHA · EXECUTIVE DASHBOARD</div>
<div class="logo-bar-right">Data Science · MLOps · Product Analytics</div>
</div>
""",
unsafe_allow_html=True,
)