2nzi's picture
first commit
ffe1030 verified
/* ===============================
STREAMLIT UI CLEANUP
=============================== */
/* Supprimer la barre supérieure complète */
header[data-testid="stHeader"] {
display: none;
}
/* Supprimer le footer */
footer {
display: none;
}
/* Supprimer le menu hamburger */
#MainMenu {
display: none;
}
/* ===============================
PADDING ET SPACING PERSONNALISÉS
=============================== */
/* Votre padding spécifique - MODIFIABLE ICI */
.st-emotion-cache-1jicfl2 {
width: 100%;
padding: 2rem 1rem 2rem !important; /* Réduire de 6rem à 2rem */
min-width: auto;
max-width: initial;
}
/* Réduire l'espacement général en haut */
.stAppViewContainer .main .block-container {
padding-top: 1rem;
padding-bottom: 1rem;
}
/* Espacement pour le contenu principal */
.main .block-container {
padding: 1rem 2rem;
}
/* ===============================
STYLES POUR L'APPLICATION RUGBY
=============================== */
/* Titre principal */
.main-header {
font-size: 2.5rem;
color: #CC0C13;
text-align: center;
margin-bottom: 2rem;
/* border-bottom: 3px solid #000000; */
padding-bottom: 3rem;
font-weight: bold;
}
/* Logo et header combinés */
.rugby-header {
display: flex;
align-items: center;
justify-content: center;
gap: 1rem;
margin-bottom: 2rem;
}
.rugby-header img {
height: 60px;
width: auto;
}
/* Cartes métriques */
.metric-card {
background: linear-gradient(135deg, #f0f8ff 0%, #e6f3ff 100%);
padding: 1.5rem;
border-radius: 15px;
border-left: 5px solid #1f4e79;
margin: 0.5rem 0;
box-shadow: 0 2px 10px rgba(31, 78, 121, 0.1);
transition: transform 0.2s ease;
}
.metric-card:hover {
transform: translateY(-2px);
box-shadow: 0 4px 20px rgba(31, 78, 121, 0.15);
}
/* ===============================
SIDEBAR PERSONNALISÉE
=============================== */
/* Style pour la sidebar */
.css-1d391kg {
background: linear-gradient(180deg, #f8f9fa 0%, #e9ecef 100%);
}
/* Titres dans la sidebar */
.css-1d391kg h1, .css-1d391kg h2, .css-1d391kg h3 {
color: #1f4e79;
font-weight: bold;
}
/* ===============================
COMPOSANTS STREAMLIT
=============================== */
/* Style pour les selectbox */
.stSelectbox > div > div {
border: 2px solid #1f4e79;
border-radius: 10px;
}
/* Style pour les métriques Streamlit */
[data-testid="metric-container"] {
background: white;
border: 1px solid #e0e0e0;
padding: 1rem;
border-radius: 10px;
box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
/* Tables et dataframes */
.stDataFrame {
border: none;
}
.stDataFrame > div {
border-radius: 10px;
overflow: hidden;
}
/* ===============================
BOUTONS PERSONNALISÉS
=============================== */
/* Style par défaut pour tous les boutons (transparent) */
.stButton > button {
background: transparent !important;
color: black !important;
border: none !important;
border-radius: 0 !important;
padding: 0.5rem 1rem !important;
font-weight: normal !important;
transition: all 0.3s ease !important;
box-shadow: none !important;
}
.stButton > button:hover {
background: rgba(40, 40, 40, 0.15) !important;
border-radius: 10px !important;
transform: translateX(5px) !important;
}
/* Style pour le bouton actif (page courante) - seulement quand il est focus/active */
.stButton > button:focus,
.stButton > button:active {
background: linear-gradient(135deg, #000000 0%, #252525 100%) !important;
color: white !important;
border: none !important;
border-radius: 10px !important;
padding: 0.5rem 1.5rem !important;
font-weight: bold !important;
box-shadow: 0 2px 8px rgba(204, 12, 19, 0.3) !important;
}
/* Supprimer le style rouge par défaut pour tous les boutons */
.stButton > button {
background: transparent !important;
color: black !important;
}
/* Style spécial pour le bouton de la page courante via session state */
.stButton > button[data-active="true"] {
background: linear-gradient(135deg, #000000 0%, #252525 100%) !important;
color: white !important;
border-radius: 10px !important;
font-weight: bold !important;
box-shadow: 0 2px 8px rgba(204, 12, 19, 0.3) !important;
}
/* ===============================
RESPONSIVE DESIGN
=============================== */
@media (max-width: 768px) {
.main-header {
font-size: 2rem;
}
.st-emotion-cache-1jicfl2 {
padding: 1rem 0.5rem 1rem !important;
}
.rugby-header {
flex-direction: column;
}
}
/* ===============================
CLASSES UTILITAIRES
=============================== */
.text-center {
text-align: center;
}
.text-rugby {
color: #1f4e79;
}
.bg-rugby {
background-color: #f0f8ff;
}
.border-rugby {
border: 2px solid #1f4e79;
}
/* Style personnalisé pour le titre avec logo */
.rugby-header-custom {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 2rem;
padding: 1rem 0;
position: relative;
}
.rugby-header-custom .title-left {
flex: 1;
text-align: right;
padding-right: 4rem;
}
.rugby-header-custom .logo-center {
position: absolute;
left: 50%;
transform: translateX(-50%);
z-index: 1;
}
.rugby-header-custom .title-right {
flex: 1;
text-align: left;
padding-left: 2rem;
}
.title-left, .title-right {
font-size: 2.5rem;
color: #000000;
font-weight: bold;
text-transform: uppercase;
}
.logo-center {
height: 80px;
width: auto;
filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}
/* Responsive pour mobile */
@media (max-width: 768px) {
.rugby-header-custom {
flex-direction: column;
gap: 1rem;
position: static;
}
.rugby-header-custom .title-left,
.rugby-header-custom .title-right {
flex: none;
text-align: center;
padding: 0;
font-size: 1.8rem;
}
.rugby-header-custom .logo-center {
position: static;
transform: none;
height: 60px;
}
}