berangerthomas's picture
Improve confusion matrix layout and add metric tooltips
9e66e53
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
min-height: 100vh;
padding: 20px;
}
.container {
max-width: 1400px;
margin: 0 auto;
}
h1 {
text-align: center;
color: white;
margin-bottom: 30px;
font-size: 2.5em;
text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}
.floating-controls {
position: fixed;
top: 20px;
right: 20px;
background: rgba(255, 255, 255, 0.65);
backdrop-filter: blur(20px);
border-radius: 15px;
padding: 20px;
box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
border: 1px solid rgba(255, 255, 255, 0.3);
z-index: 1000;
width: 320px;
}
.controls-title {
text-align: center;
font-size: 18px;
font-weight: bold;
margin-bottom: 15px;
color: #333;
cursor: grab;
}
.controls-title:active {
cursor: grabbing;
}
.controls-grid {
display: grid;
grid-template-columns: 1fr;
gap: 20px;
}
.control-group {
text-align: center;
}
.control-label {
font-weight: bold;
margin-bottom: 5px;
font-size: 14px;
color: #555;
}
.slider {
width: 100%;
}
.slider-value {
font-weight: bold;
color: #333;
margin-top: 5px;
font-size: 16px;
}
.charts-container {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 30px;
}
.chart-card {
background: rgba(255, 255, 255, 0.95);
border-radius: 15px;
padding: 25px;
box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}
.chart-title {
font-size: 18px;
font-weight: bold;
margin-bottom: 15px;
text-align: center;
color: #333;
}
.chart-container {
position: relative;
height: 300px;
margin-bottom: 20px;
}
.confusion-matrix-layout {
position: relative;
width: 250px;
height: 250px;
margin: 0 auto; /* Center the block horizontally */
top: 50%; /* Center the block vertically */
transform: translateY(-50%);
}
.matrix-ylabel,
.matrix-xlabel {
position: absolute;
font-weight: bold;
color: #555;
font-style: italic;
white-space: nowrap;
}
.matrix-ylabel {
top: 50%;
left: -20px; /* Position label just outside the container */
transform: translateY(-50%) rotate(-90deg);
}
.matrix-xlabel {
bottom: -25px; /* Position label just outside the container */
left: 50%;
transform: translateX(-50%);
}
.matrix-canvas-container {
width: 100%;
height: 100%;
}
#matrixChart {
max-width: 100%;
max-height: 100%;
}
/* [NOUVEAU] Style pour le footer */
footer {
text-align: center;
padding: 20px;
margin-top: 40px;
}
footer a {
color: rgba(255, 255, 255, 0.8);
text-decoration: none;
font-weight: bold;
transition: color 0.3s;
}
footer a:hover {
color: white;
}
@media (max-width: 1200px) {
.charts-container {
grid-template-columns: 1fr;
}
.floating-controls {
position: static;
width: 100%;
margin-bottom: 20px;
}
}