![Robot](https://cdn-icons-png.flaticon.com/512/6188/6188530.png)
#!/usr/bin/env python import gradio as gr # CSS perso pour : # 1) Le fond pastel # 2) La barre de navigation # 3) Les nuages + positionnement custom_css = """ /* Fond pastel sur toute la page */ html, body { margin: 0; padding: 0; height: 100%; background: linear-gradient(135deg, #FDE2E2, #E2ECFD) !important; font-family: 'Arial', sans-serif; } /* Barre de navigation */ .nav-bar { display: flex; align-items: center; justify-content: space-between; padding: 0.5rem 2rem; background-color: #fbe8d3; /* Couleur très légère pour la barre */ } .nav-left, .nav-right { display: flex; align-items: center; } .nav-logo { font-size: 1.5rem; font-weight: bold; margin-right: 2rem; } .nav-links a { margin-right: 1.5rem; text-decoration: none; color: #8c5b3e; font-weight: 500; } .nav-links a:hover { text-decoration: underline; } /* Conteneur principal au centre (pour le robot + nuages) */ .main-container { position: relative; width: 100%; max-width: 600px; height: 600px; margin: 1rem auto; text-align: center; } /* Style de l'icône robot */ .robot-icon { width: 80px; margin: 1rem auto; } /* Texte sous le robot */ .title-consent { font-size: 1.2rem; font-weight: bold; margin-bottom: 0.3rem; } .subtitle-consent { font-size: 0.9rem; color: #333; margin-bottom: 1.2rem; } /* Positionnement et style des nuages */ .cloud { position: absolute; width: 130px; padding: 0.5rem; background: #fff; border-radius: 50px; box-shadow: 0 2px 4px rgba(0,0,0,0.2); cursor: pointer; transition: transform 0.2s; text-align: center; font-size: 0.9rem; } .cloud:hover { transform: scale(1.05); } /* 5 nuages : positionnés autour du centre */ .cloud1 { top: 5%; left: 40%; } .cloud2 { top: 30%; left: 10%; } .cloud3 { top: 30%; right: 10%; } .cloud4 { bottom: 10%; left: 20%; } .cloud5 { bottom: 10%; right: 20%; } /* Pied de page ou zone pour le chat */ .footer-chat { margin-top: 2rem; } /* Couleur du texte dans la zone markdown */ .markdown-prose { color: #000 !important; } """ # HTML pour la barre de navigation nav_bar_html = """
""" # HTML pour la zone centrale (robot + nuages). # onclick="cloudClicked('xxxx')" => appelle une fonction JS main_html = """