/* mle-analyses.css - Ecran MLE Analyses (portage Form_SR_Analyses) */
.mle-page {
    font-size: 14px;
}

.mle-topbar {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.mle-species {
    color: #555;
}

.mle-layout {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.mle-col-left {
    flex: 0 0 300px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mle-col-mid {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mle-col-right {
    flex: 0 0 320px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mle-pane {
    border: 1px solid var(--color-border, #d0d0d0);
    border-radius: 4px;
    background: #fff;
    overflow: hidden;
}

.mle-pane-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
    padding: 8px 10px;
    background: #005068;
    color: #fff;
    font-weight: 600;
}

.mle-pane-header small {
    font-weight: 400;
    opacity: .85;
}

.mle-pane-body {
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mle-pane-footer {
    padding: 8px 10px;
    display: flex;
    gap: 8px;
    border-top: 1px solid #eee;
}

.mle-tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid #ddd;
    background: #f5f5f5;
}

.mle-tabs button {
    flex: 1;
    padding: 7px 4px;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    font-size: 13px;
}

.mle-tabs button.active {
    border-bottom-color: #005068;
    color: #005068;
    font-weight: 700;
}

.mle-row label {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
}

.mle-row select,
.mle-pane-body select,
.mle-pane-body input[type=text] {
    min-width: 0;
    flex: 1;
}

.mle-check {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    cursor: pointer;
}

.mle-hint {
    color: #888;
    font-size: 12px;
}

.mle-mini-list {
    font-size: 12px;
    color: #555;
    max-height: 90px;
    overflow: auto;
}

.mle-table-wrap {
    max-height: 320px;
    overflow: auto;
    border: 1px solid #eee;
}

.mle-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.mle-table th,
.mle-table td {
    border: 1px solid #e5e5e5;
    padding: 3px 6px;
    text-align: center;
    white-space: nowrap;
}

.mle-table thead th {
    background: #f0f0f0;
    position: sticky;
    top: 0;
    text-align: center;
}

.mle-table td.num,
.mle-table th.num {
    text-align: center;
}

.mle-table tr.sel-row {
    background: #e8f4f8;
}

.mle-table th.var-col {
    background: #6a966d;
    color: #fff;
    cursor: pointer;
}

.mle-table td.num.gt-zero {
    background: #e4f1e5;
    color: #2e5c31;
    font-weight: 600;
}

.mle-btn-row {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.mle-chart-box {
    position: relative;
    height: 300px;
}

.mle-chart-box canvas {
    width: 100% !important;
    height: 100% !important;
}

/* ===== Graphique (meme charte que analyses.css) ===== */
.mle-chart-tools {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
}

.mle-chart-tools label {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.mle-chart-tools select {
    flex: 0 0 auto;
    min-width: 0;
    padding: 4px 8px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: var(--border-radius, 4px);
    background-color: #fff;
    color: var(--color-text, #333);
    font-size: 0.85rem;
}

.mle-chart-tools select:focus {
    outline: none;
    border-color: #fff;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}

.mle-chart-tools select:disabled,
.mle-fullscreen-btn:disabled {
    opacity: .5;
    cursor: not-allowed;
}

.mle-fullscreen-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 26px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: var(--border-radius, 4px);
    background-color: transparent;
    color: #fff;
    font-size: 0.8rem;
    cursor: pointer;
    transition: var(--transition-base, all 0.3s ease);
}

.mle-fullscreen-btn:hover:not(:disabled) {
    background-color: #fff;
    color: var(--color-primary, #005068);
}

.mle-chart-status {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--color-text-secondary, #666);
    font-size: 13px;
}

.mle-chart-message {
    color: #d32f2f;
}

.mle-pane-header #mle-chart-title {
    font-weight: 700;
}

.mle-table th.var-col.selected {
    outline: 2px solid #f59e0b;
    outline-offset: -2px;
}

/* Popup plein ecran du graphique */
.mle-chart-modal {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 3000;
    background-color: rgba(0, 0, 0, 0.65);
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.mle-chart-modal.is-open {
    display: flex;
}

.mle-modal-dialog {
    display: flex;
    flex-direction: column;
    width: min(1500px, 95vw);
    height: 92vh;
    background-color: #fff;
    border-radius: var(--border-radius, 6px);
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

.mle-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 16px;
    background-color: var(--color-primary, #005068);
    color: #fff;
}

.mle-modal-heading {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.mle-modal-heading strong {
    font-size: 1.05rem;
}

.mle-modal-heading small {
    opacity: .9;
    font-size: 0.8rem;
}

.mle-modal-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: var(--border-radius, 4px);
    background-color: transparent;
    color: #fff;
    cursor: pointer;
    transition: var(--transition-base, all 0.3s ease);
}

.mle-modal-close:hover {
    background-color: #fff;
    color: var(--color-primary, #005068);
}

.mle-modal-body {
    position: relative;
    flex: 1;
    min-height: 0;
    padding: 16px;
}

#mle-paste {
    width: 100%;
    box-sizing: border-box;
}

@media (max-width: 1100px) {
    .mle-layout {
        flex-direction: column;
    }

    .mle-col-left,
    .mle-col-right {
        flex: 1 1 auto;
    }
}