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"""
|
| 7 |
+
<style>
|
| 8 |
+
/* Style du titre principal */
|
| 9 |
+
.title {
|
| 10 |
+
text-align: center;
|
| 11 |
+
font-size: 42px;
|
| 12 |
+
color: #FF6B6B;
|
| 13 |
+
font-weight: bold;
|
| 14 |
+
text-transform: uppercase;
|
| 15 |
+
margin-bottom: 10px;
|
| 16 |
+
}
|
| 17 |
+
|
| 18 |
+
/* Style de la description d'accueil */
|
| 19 |
+
.welcome-text {
|
| 20 |
+
text-align: center;
|
| 21 |
+
font-style: italic;
|
| 22 |
+
font-size: 22px;
|
| 23 |
+
margin-bottom: 30px;
|
| 24 |
+
color: #444444;
|
| 25 |
+
}
|
| 26 |
+
|
| 27 |
+
/* Style du texte de section */
|
| 28 |
+
.section-title {
|
| 29 |
+
font-size: 28px;
|
| 30 |
+
font-weight: bold;
|
| 31 |
+
color: #1E90FF;
|
| 32 |
+
margin-top: 20px;
|
| 33 |
+
margin-bottom: 10px;
|
| 34 |
+
}
|
| 35 |
+
/* Style du conteneur de bouton */
|
| 36 |
+
.button-container {
|
| 37 |
+
display: flex;
|
| 38 |
+
justify-content: center;
|
| 39 |
+
margin-top: 30px;
|
| 40 |
+
margin-bottom: 20px;
|
| 41 |
+
}
|
| 42 |
+
/* Style du bouton */
|
| 43 |
+
.info-button {
|
| 44 |
+
background-color: #1E90FF;
|
| 45 |
+
color: white;
|
| 46 |
+
padding: 10px 20px;
|
| 47 |
+
border: none;
|
| 48 |
+
border-radius: 5px;
|
| 49 |
+
font-size: 18px;
|
| 50 |
+
text-decoration: none;
|
| 51 |
+
display: inline-block;
|
| 52 |
+
cursor: pointer;
|
| 53 |
+
transition: background-color 0.3s ease;
|
| 54 |
+
}
|
| 55 |
+
.info-button:hover {
|
| 56 |
+
background-color: #FF6B6B;
|
| 57 |
+
}
|
| 58 |
+
/* Style du pied de page */
|
| 59 |
+
.footer {
|
| 60 |
+
font-style: italic;
|
| 61 |
+
font-size: 16px;
|
| 62 |
+
text-align: center;
|
| 63 |
+
margin-top: 40px;
|
| 64 |
+
color: #888888;
|
| 65 |
+
}
|
| 66 |
+
</style>
|
| 67 |
+
""",
|
| 68 |
+
unsafe_allow_html=True
|
| 69 |
+
)
|
| 70 |
+
|
| 71 |
+
# Titre principal centré et stylisé
|
| 72 |
+
st.markdown('<div class="title">AnemiaScope</div>', unsafe_allow_html=True)
|
| 73 |
+
|
| 74 |
+
# Texte de bienvenue
|
| 75 |
+
st.markdown('<div class="welcome-text">Bienvenue sur notre application dédiée à la sensibilisation et à l\'analyse de l\'anémie chez les adolescentes</div>', unsafe_allow_html=True)
|
| 76 |
+
|
| 77 |
+
st.write("""
|
| 78 |
+
Cette application vous permet de :
|
| 79 |
+
- Découvrir les fondamentaux de l'anémie.
|
| 80 |
+
- Explorer les données sur la prévalence de l'anémie.
|
| 81 |
+
- Visualiser des dashboards avec des filtres de risque.
|
| 82 |
+
- Prédire le statut anémique d'une adolescente.
|
| 83 |
+
- Générer un rapport téléchargeable.
|
| 84 |
+
""")
|
| 85 |
+
|
| 86 |
+
# Section déroulante pour en savoir plus sur l'anémie avec deux colonnes
|
| 87 |
+
with st.expander("👉 En savoir plus sur l'anémie", expanded=False):
|
| 88 |
+
col1, col2 = st.columns(2)
|
| 89 |
+
|
| 90 |
+
# Colonne 1 : Définition de l'anémie
|
| 91 |
+
with col1:
|
| 92 |
+
st.markdown('<div class="section-title">Qu\'est-ce que l\'anémie ?</div>', unsafe_allow_html=True)
|
| 93 |
+
st.write("""
|
| 94 |
+
L'anémie se caractérise par un manque de globules rouges sains pour transporter l'oxygène dans le corps. Les symptômes incluent :
|
| 95 |
+
- Fatigue
|
| 96 |
+
- Pâleur
|
| 97 |
+
- Essoufflement
|
| 98 |
+
""")
|
| 99 |
+
|
| 100 |
+
# Colonne 2 : Groupes à risque
|
| 101 |
+
with col2:
|
| 102 |
+
st.markdown('<div class="section-title">Groupes à risque</div>', unsafe_allow_html=True)
|
| 103 |
+
st.write("""
|
| 104 |
+
Groupes les plus vulnérables :
|
| 105 |
+
- Enfants de moins de 5 ans
|
| 106 |
+
- Femmes enceintes et allaitantes
|
| 107 |
+
- Femmes en âge de procréer
|
| 108 |
+
- Adolescentes
|
| 109 |
+
""")
|
| 110 |
+
|
| 111 |
+
# Causes et prévention
|
| 112 |
+
st.markdown('<div class="section-title">Causes de l\'anémie</div>', unsafe_allow_html=True)
|
| 113 |
+
st.write("""
|
| 114 |
+
Les causes principales sont :
|
| 115 |
+
- **Carence en fer**
|
| 116 |
+
- **Carence en vitamines** (B12, acide folique)
|
| 117 |
+
- **Perte de sang** (menstruations abondantes)
|
| 118 |
+
""")
|
| 119 |
+
|
| 120 |
+
st.markdown('<div class="section-title">Prévention</div>', unsafe_allow_html=True)
|
| 121 |
+
st.write("""
|
| 122 |
+
- **Alimentation équilibrée** : riche en fer
|
| 123 |
+
- **Suppléments** : si nécessaire
|
| 124 |
+
- **Suivi médical** : vérifier le taux d'hémoglobine
|
| 125 |
+
""")
|
| 126 |
+
|
| 127 |
+
# Bouton pour en savoir plus
|
| 128 |
+
st.markdown(
|
| 129 |
+
"""
|
| 130 |
+
<div class="button-container">
|
| 131 |
+
<a class="info-button" href="https://www.who.int/fr/news-room/fact-sheets/detail/anaemia" target="_blank">
|
| 132 |
+
Cliquez ici pour plus d'informations
|
| 133 |
+
</a>
|
| 134 |
+
</div>
|
| 135 |
+
""",
|
| 136 |
+
unsafe_allow_html=True
|
| 137 |
+
)
|
| 138 |
+
|
| 139 |
+
# Texte de fin de page
|
| 140 |
+
st.markdown('<div class="footer">Explorez les différentes sections pour débuter votre analyse.</div>', unsafe_allow_html=True)
|
| 141 |
+
|
| 142 |
+
if __name__ == '__main__':
|
| 143 |
+
show()
|