/* Mise à jour de iframe_style.css */

.dashboard-section {
    padding: 2rem;
    background: #f8f9fa;
    width: 100%;
}

.iframe-container {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    width: 100%;
}

.iframe-header {
    background: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    padding: 1rem 1.5rem;
}

.iframe-header h2 {
    margin: 0;
    font-size: 1.25rem;
    color: #212529;
}

.dashboard-iframe {
    width: 100%;
    /* Ajuster la hauteur en fonction du contenu Dash */
    /*  height: 3500px; Hauteur suffisante pour le graphique */
    border: none;
    display: block;
}

/* Styles pour le loading spinner */
.iframe-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    background: rgba(255, 255, 255, 0.9);
    padding: 2rem;
    border-radius: 8px;
    z-index: 2;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--main-orange);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Styles responsifs */
@media (max-width: 768px) {
    .dashboard-section {
        padding: 1rem;
    }

    .dashboard-iframe {
        height: 1000px; /* Hauteur ajustée pour mobile */
    }
}

@media (max-width: 480px) {
    .dashboard-section {
        padding: 0.5rem;
    }

    .dashboard-iframe {
        height: 800px; /* Hauteur ajustée pour très petits écrans */
    }
}