canary_aed_streaming / assets /custom_style.css
Archime's picture
Updates UI state error
d296c7b
:root {
--accent-blue: #3B82F6;
--accent-indigo: #6366F1;
--light-bg: #FFFFFF;
--soft-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}
#root, .gradio-container {
display: flex;
flex-direction: column;
align-items: center;
}
.gradio-container {
max-width: 960px;
min-width: 960px;
margin: 0 auto !important;
padding: 1.5rem;
}
body {
background: #F4F6F8;
display: flex;
justify-content: center;
}
@media (max-width: 768px) {
.gradio-container {
max-width: 95%;
padding: 0.5rem;
}
.gr-button {
width: 100%;
}
}
.gr-block {
width: 100%;
margin: 0 auto;
border-radius: 12px;
box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}
.gr-button {
background: var(--accent-blue);
border-radius: 10px;
box-shadow: var(--soft-shadow);
transition: all 0.25s ease;
font-weight: 600;
text-transform: uppercase;
}
.gr-button:hover {
background: var(--accent-indigo);
transform: translateY(-2px);
}
.gr-block {
background: var(--light-bg);
border: 1px solid #E5E7EB;
border-radius: 12px;
box-shadow: var(--soft-shadow);
padding: 12px;
}
.gr-markdown h2 {
color: #1E3A8A;
font-weight: 700;
}
.gr-radio, .gr-dropdown, .gr-number, .gr-checkbox {
max-width: 320px;
margin: 0.5rem auto;
}
.gr-textbox {
max-width: 600px;
margin: 1rem auto;
}
.gr-button {
max-width: 250px;
margin: 1rem auto;
display: block;
}
/* ==== Custom style for examples section ==== */
/* === Clean style for audio examples === */
.gr-examples {
background: #FFFFFF !important; /* fond blanc */
border: 1px solid #E5E7EB !important; /* bordure légère */
border-radius: 10px !important;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
padding: 0.5rem 1rem !important;
}
.gr-examples .example {
background: #FAFAFA !important; /* gris ultra clair */
border: 1px solid #E5E7EB !important;
border-radius: 8px !important;
color: #1F2937 !important;
font-weight: 500;
transition: all 0.2s ease-in-out;
}
.gr-examples .example:hover {
background: #EFF6FF !important; /* bleu très clair au survol */
border-color: #3B82F6 !important;
transform: translateY(-1px);
cursor: pointer;
}
.gr-examples-label {
font-weight: 600;
color: #1E3A8A;
margin-bottom: 0.5rem;
background: transparent !important;
border: none !important;
}
/* supprime le fond gris hérité sur le conteneur interne */
.gr-panel {
background: transparent !important;
border: none !important;
}
/* === Smooth step transition animation === */
[data-testid="block"] {
opacity: 0;
ransform: translateY(10px) scale(0.98);;
transition: opacity 0.5s ease, transform 0.5s ease;
}
/* Step visible (Gradio auto-class) */
[data-testid="block"].svelte-drum21,
[data-testid="block"]:not([style*="display: none"]) {
opacity: 1 !important;
ransform: translateY(10px) scale(0.98); !important;
}
/* Smooth transitions when changing steps */
.gr-walkthrough > div {
transition: all 0.4s ease-in-out;
}
/* Optional: soft highlight on current step */
.gr-step-header[data-selected="true"] {
background: #EFF6FF !important;
border-radius: 6px;
box-shadow: 0 0 6px rgba(59,130,246,0.3);
}
#status-message-stream {
background-color: #FFF5F5;
border: 1px solid #DC2626;
border-radius: 6px;
padding: 0.75rem;
color: #991B1B;
font-weight: 500;
}
#status-message-task {
padding: 0.75rem;
border-radius: 8px; /* Coins arrondis */
margin-top: 10px;
font-weight: 500; /* Un peu plus gras que la normale */
border: 1px solid transparent;
display: none; /* Caché par défaut */
}
/* Le style .info (bleu) */
#status-message-task.info,#status-message-task.success,#status-message-task.done{
color: #0c5464; /* Texte bleu foncé */
background-color: #d1ecf1; /* Fond bleu clair */
border-color: #bee5eb; /* Bordure bleue */
display: block; /* Le rend visible */
}
/* Le style .warning (jaune/orange) */
#status-message-task.warning {
color: #856404; /* Texte ocre */
background-color: #fff3cd; /* Fond jaune clair */
border-color: #ffeeba; /* Bordure jaune */
display: block; /* Le rend visible */
}
/* Le style .error (rouge) */
#status-message-task.error {
color: #721c24; /* Texte rouge foncé */
background-color: #f8d7da; /* Fond rouge clair */
border-color: #f5c6cb; /* Bordure rouge */
display: block; /* Le rend visible */
}
/* #live-stream {
position: relative;
display: flex;
min-height: 100px;
max-height: 128px;
justify-content: center;
align-items: center;
margin: 2rem 0;
} */
#task-output-box textarea {
font-size: 1.15em; /* 'Moyenne taille' - ajustez au besoin */
font-weight: bold; /* 'En gras' */
}
.gradio-webrtc-waveContainer {
background-color :white
}
/* --- 4. L'Icône Centrale (Style Bouton) --- */
.gradio-webrtc-icon-container {
position: relative;
width: 128px;
height: 128px;
display: flex;
justify-content: center;
align-items: center;
}
.gradio-webrtc-icon {
position: relative;
width: 64px;
height: 64px;
border-radius: 0.5rem; /* Carré arrondi comme les boutons de l'exemple */
display: flex;
justify-content: center;
align-items: center;
z-index: 2;
/* Style Bouton Plein (Solid) */
background-color: var(--color-accent);
color: white;
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
transition: all 0.2s ease;
}
/* Effet Hover */
.gradio-webrtc-icon:hover {
opacity: 0.9;
transform: translateY(-1px);
}