/* Style commun pour toutes les pages IJCAI25 */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 20px;
    line-height: 1.6;
    color: #111;
    background: #fff;
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    zoom: 90%;
}

h1, h2, h3 {
    color: #2c3e50;
    margin-top: 1.5em;
}

a {
    color: #0066cc;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.nav-bar {
    margin-bottom: 30px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.nav-bar button {
    padding: 8px 16px;
    background-color: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9em;
    transition: all 0.2s;
}

.nav-bar button:hover {
    background-color: #e0e0e0;
}

.nav-bar .home-link {
    margin-right: auto;
    font-weight: 500;
    color: #2c3e50;
}

.chart-container {
    margin: 20px 0;
    padding: 20px;
    border: 1px solid #eee;
    border-radius: 8px;
    background-color: #fff;
}

.controls {
    margin: 20px 0;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
}

.control-group {
    margin-bottom: 15px;
}

.control-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

select, input[type="range"] {
    width: 100%;
    max-width: 300px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* Style pour les graphiques */
.bar {
    fill-opacity: 0.8;
}

.axis-label {
    font-size: 12px;
}

.legend {
    font-size: 12px;
}

/* Amélioration de la lisibilité de l'axe X */
.axis text {
    font-size: 12px;
    fill: #333;
}

.axis.x text {
    font-size: 10px;
    text-anchor: end;
    transform: rotate(-45deg);
    dominant-baseline: hanging;
}

.axis path,
.axis line {
    fill: none;
    stroke: #999;
    shape-rendering: crispEdges;
}

.tooltip {
    position: absolute;
    text-align: center;
    width: auto;
    padding: 8px;
    font: 12px sans-serif;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    border: 0px;
    border-radius: 4px;
    pointer-events: none;
}

.legend-box {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    position: absolute;
    right: 20px;
    top: 50px;
    background: white;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    max-width: 200px;
    font-size: 0.9em;
}

.legend-item {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
}

.legend-color {
    width: 15px;
    height: 15px;
    margin-right: 8px;
    border: 1px solid #ddd;
}

/* Responsive design */
@media (max-width: 768px) {
    .nav-bar {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .nav-bar .home-link {
        margin: 0 0 10px 0;
    }
    
    .legend-box {
        position: static;
        margin: 20px 0;
        width: 100%;
        box-sizing: border-box;
    }
    
    /* Ajustement pour les petits écrans */
    .axis.x text {
        font-size: 8px;
    }
}
