﻿@import url('open-iconic/font/css/open-iconic-bootstrap.min.css');


:root {
    --rz-primary: #050D9E;
    --rz-tabs-padding: 10px;
    --rz-menu-top-item-background-color: #050D9E;
}

html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

a, .btn-link {
    color: #0366d6;
}

.page {
    height: 100vh
}

.btn-primary {
    color: #fff;
    background-color: #050D9E;
    border-color: #1861ac;
}

.content {
    padding-top: 0.5rem;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }


.field-label {
    width: 300px;
    text-align: right;
    /*background-color: #bdd3d8;*/
    padding: 5px;
    align-items: center;
    margin-bottom: 0px;
    align-content: center
}

.field-value {
    vertical-align: middle;
    text-align: left;
    /*background-color: #d5ebf0;*/
    padding: 5px;
    display: inline-block;
}

.page-header {
    color: black;
    font-size: 36px;
    border-bottom: solid;
    border-color: dimgrey;
}

.field-label-and-value {
    margin-top: 4px;
    margin-bottom: 4px;
    display: flex;
    flex-direction: row
}

.form-buttons {
    margin: 20px 10px 0px 10px;
    display: flex;
    justify-content: center;
    margin-bottom: auto;
    width: 100%;
    position: inherit;
    bottom: 40px;
}

.form-one-button {
    margin-left: 30px;
    margin-right: 30px
}

.my-custom-tooltip .rz-tooltip-content {
    background: lightyellow !important;
    color: black
}

.disable-select {
    user-select: none; /* supported by Chrome and Opera */
    -webkit-user-select: none; /* Safari */
    -moz-user-select: none; /* Firefox */
    -ms-user-select: none; /* Internet Explorer/Edge */
}

.edit-button {
    background-color: powderblue !important;
}

    .edit-button:hover {
        background-color: cornflowerblue !important;
    }

.rz-fieldset-legend-text {
    font-weight: bold
}

.element-with-hidden-child {
}

    .element-with-hidden-child .hidden-child {
        visibility: hidden;
    }

    .element-with-hidden-child:hover .hidden-child {
        visibility: visible;
    }

.rz-timepicker .rz-button-md {
    background-color: #4340D2 !important
}

.chip {
    padding: 1px 10px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: auto;
    line-height: 1.2;
    font-size: 14px;
    white-space: nowrap;
    margin: 4px;
}

/* Pour la page Home (liste des scénarios), applique sur toutes les panels sous ce RadzenTabs */
.opened-scenarios-tabs .rz-tabview-panel {
    padding-top: 0px;
}


.rz-tabview.rz-tabview-top > .rz-tabview-nav > :not(.rz-tabview-selected):has(.scenario-tab) {
    border-color: white;
    border-right: none;
    border-left: none;
    border-top: none;
    border-width: 1px;
}

    .rz-tabview.rz-tabview-top > .rz-tabview-nav > :not(.rz-tabview-selected):has(.scenario-tab):hover {
        border-color: #fff9f9;
        border-right: none;
        border-left: none;
        border-top: none;
        border-width: 1px;
    }


.rz-tabview.rz-tabview-top > .rz-tabview-nav .rz-tabview-selected:has(.scenario-tab) {
    border: solid;
    border-width: thin;
    border-top-width: thin !important;
    border-top-color: black;
    border-bottom-width: medium;
    border-color: #dbdbdb;
}

/* === Layout Home (sans float) === */
.tabs-shell {
    display: flex;
    flex-wrap: wrap; /* nav sur la 1ère ligne, panels sur la 2e */
    align-items: flex-end; /* aligne le bas du bouton et de la barre d’onglets */
    width: 100%;
    border-bottom: 2px solid #e5e5e5;
}

    /* Bouton (ImportMenu) collé aux onglets + ligne grise sous le bouton aussi */
    .tabs-shell .import-menu {
        display: inline-flex;
        align-items: center;
        padding-right: 12px; /* espace à droite SANS créer de trou dans la ligne */
        position: relative; /* pour le pseudo-élément de la ligne */
        height: 50px;
    }

        /* Ligne grise continue sous le bouton (même y que sous les onglets) */
        .tabs-shell .import-menu::after {
            content: "";
            position: absolute;
            left: 0;
            right: 0; /* couvre aussi le padding-right -> pas de “trou” */
            bottom: -2px;
            height: 2px;
            background: #e5e5e5;
        }

    /* Expose nav + panels (uniquement pour ces onglets) */
    .tabs-shell > #home-tabs {
        display: contents;
    }

/* === Barre d’onglets Home === */
#home-tabs > .rz-tabview-nav {
    order: 1;
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    gap: 8px; /* espacement entre onglets */
    padding-bottom: 0px;
    border-bottom: 2px solid #e5e5e5; /* séparateur sous la barre */
    background: transparent;
    position: relative;
    bottom: -1px;
}

    /* Onglets (inactifs) : légèrement grisés */
    #home-tabs > .rz-tabview-nav li {
        position: relative; /* requis pour le ::after de l’actif */
        border: 1px solid #d6d6d6;
        border-bottom: none; /* raccord avec les panels */
        border-radius: 8px 8px 0 0;
        background: #f5f6f8;
        color: #61666c; /* texte un peu grisé */
        transition: background 120ms ease, box-shadow 120ms ease, border-color 120ms ease, color 120ms ease;
    }

        /* Titre/Lien onglet */
        #home-tabs > .rz-tabview-nav li a,
        #home-tabs > .rz-tabview-nav li .rz-tabview-title {
            display: block;
            padding: 8px 12px;
            font-weight: 600;
            text-decoration: none;
            white-space: nowrap;
        }

        /* Hover (non sélectionné) : un soupçon plus sombre */
        #home-tabs > .rz-tabview-nav li:not(.rz-tabview-selected):hover {
            background: #eef0f3;
            border-color: #cfcfcf;
            color: #4e5257;
            box-shadow: 0 1px 0 rgba(0,0,0,.04) inset;
        }

        /* Onglet sélectionné : fond blanc, bord plus marqué */
        #home-tabs > .rz-tabview-nav li.rz-tabview-selected {
            background: #fff;
            border-color: #bdbdbd;
            color: #050D9E;
            z-index: 2;
            margin-bottom: -2px
        }

            /* Trait bleu sous l’onglet sélectionné — un peu plus haut qu’avant */
            #home-tabs > .rz-tabview-nav li.rz-tabview-selected::after {
                content: "";
                position: absolute;
                left: 8px; /* ajuste si besoin */
                right: 8px;
                bottom: 6px; /* ← remonte le trait (plus haut que -5px) */
                height: 3px;
                background: var(--rz-primary, #050D9E);
                border-radius: 2px;
            }

/* === Panneaux de contenu (plein largeur, SANS bordure) === */
#home-tabs > .rz-tabview-panels {
    order: 2;
    flex: 1 1 100%;
    width: 100%;
    border: none; /* aucun cadre autour du contenu */
    border-radius: 0;
    background: transparent; /* pas de fond encadrant */
    margin-top: 8px; /* petite respiration sous la barre */
}

/* Mobile : empilement propre */
@media (max-width: 900px) {
    #home-tabs > .rz-tabview-nav {
        flex-basis: 100%;
    }
}

/* Le contenu du header d'onglet (template) passe en flex */
#home-tabs > .rz-tabview-nav li a .scenario-tab,
#home-tabs > .rz-tabview-nav li .rz-tabview-title .scenario-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}

/* Zone texte : max 800px + ellipsis */
#home-tabs > .rz-tabview-nav li a .scenario-tab__title,
#home-tabs > .rz-tabview-nav li .rz-tabview-title .scenario-tab__title {
    flex: 1 1 auto;
    max-width: 800px;
    min-width: 0; /* indispensable pour que l’ellipsis fonctionne en flex */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Bouton de fermeture compact, aligné à droite naturellement par le flex */
#home-tabs > .rz-tabview-nav li a .scenario-tab__close,
#home-tabs > .rz-tabview-nav li .rz-tabview-title .scenario-tab__close {
    margin-left: 8px;
    padding: 0 4px;
}

.rz-tabview-top > .rz-tabview-panels {
    border-top: 2px solid #e5e5e5 !important;
    padding-top: 5px;
}


/* === Contrat de page : header fixe + contenu scrollable === */
/* 1) Colonne verticale : header fixe + contenu extensible */
.page,
.page .main {
    display: flex;
    flex-direction: column;
    min-height: 100dvh; /* plein viewport, compatible mobile */
}

/* 2) Le header ne scrolle pas */
.top-row {
    flex: 0 0 auto;
}

/* 3) La zone de contenu prend tout le reste ET c’est le SEUL viewport de scroll */
.content {
    flex: 1 1 auto;
    min-height: 0; /* crucial pour autoriser le scroll d'un enfant en flex */
    overflow: auto; /* 👉 la seule barre de défilement */
    overscroll-behavior: contain; /* évite le scroll qui “bave” vers body */
}

/* 4) On interdit le scroll global de la page (pour forcer celui de .content) */
html, body {
    height: 100%;
    overflow: hidden; /* pas de scroll ailleurs que .content */
}

/* 5) Radzen TabView : ne pas étouffer le scroll du contenu */
.opened-scenarios-tabs .rz-tabview-panels,
.opened-scenarios-tabs .rz-tabview-panel,
.output-tabs-root .rz-tabview-panels,
.output-tabs-root .rz-tabview-panel {
    min-height: 0 !important;
    overflow: visible !important; 
}

    .output-tabs-root .rz-tabview-panel.is-scrollable {
        overflow: auto !important; 
    }


.output-tabs-root {
    height: 100% !important;
    overflow: auto !important;
    max-height: calc(100vh - 15.5rem) !important;
}
