html {
    font-size: 14px;
}

pre{
    display:block;
}
.answers .alert{
    margin:10px;
}

.history, .prompts{
    height: 95vh;
    overflow: scroll;
    overflow-x: hidden;
}

.history{
    direction: rtl;
    overflow:auto;
}

.history .accordion{
    direction:ltr;
}


.history .accordion-header button, .prompts .accordion-header button{
    margin: 0;
    padding: 0.5rem;
}
.history kbd, .prompts kbd{
    background-color: #bbb;
}

kbd.prompt-default {
    background-color: #888;
}

.badge{
    font-weight: 400;
}

.questions{
    border: 1px solid #999;
    border-radius: 5px;
    -webkit-box-shadow: 0px 0px 15px 3px rgba(0,0,0,0.46); 
    box-shadow: 0px 0px 15px 3px rgba(0,0,0,0.46);
    margin: 1.5rem;
}


.alert-dismissible.questions{
    padding-right: 1rem;
}

.question{
    position:relative;
    -webkit-box-shadow: 0px 0px 15px 3px rgba(0,0,0,0.46); 
    box-shadow: 0px 0px 15px 3px rgba(0,0,0,0.46);
    margin: 1rem 1rem 2rem 1rem; 
    /*padding-right: 180px !important;*/
}

.accordion-item .question
{
	/*padding-right: 0.75rem;*/
}

.alert-dismissible .btn-close{
    padding: 0.75rem 0.75rem;
}

.question , .currentQuestion{
    background-color: #eee;
    border-radius: 5px;
    padding: 10px;
    font-size: 1.2rem;    
}


.question table, .answers table {
    width: 100%;
    border-collapse: collapse;
}

.question table, .question th, .question td, .answers table, .answers th, .answers td {
    border: 1px solid black;
}

.question th, .question td, .answers th, .answers td  {
    padding: 10px;
    text-align: left;
}

.question th, .answers th {
	background-color: #f2f2f2;
}

.currentQuestion .question{
    -webkit-box-shadow: none !important;
    box-shadow: none !important;
}

button.question-continue {
    
}

#page{
    height: 100vh;
    flex-grow: 1;
    max-width: calc(100vw - 6.6rem);
}

.accordion-header span{
   white-space: nowrap; /* Empêche le retour à la ligne */
   overflow: hidden; /* Cache le texte qui dépasse du conteneur */
   text-overflow: ellipsis; /* Ajoute "..." à la fin du texte tronqué */
}

.accordion-header kbd{
    white-space: nowrap;
}

.prompt-accordion-item .accordion-header{
	width: calc(100% - 7.5rem);    
}



.prompt-accordion-item, .prompt-accordion-item .accordion-header .accordion-button {
    border-top-left-radius: var(--bs-accordion-border-radius);
    border-top-right-radius: var(--bs-accordion-border-radius);
    border-bottom-right-radius: var(--bs-accordion-border-radius);
    border-bottom-left-radius: var(--bs-accordion-border-radius);
}

.accordion-body .question {
    margin-bottom: 1rem;
    background-color: #eee;
    border-radius: 5px;
    padding: 10px;
}

.badges{
    margin-bottom: 0.75rem;
    margin-left:1rem;    
}

.badge{
    font-size: 0.85rem;
    margin-right: 0.5rem; 
}
.badges .bg-light {
    background-color: #ddd!important;
}

.badge svg{
    width: 1rem;
    height: 1rem;
    vertical-align: sub;
}

.spinner .spinner-border{
    width:4rem;
    height: 4rem;;
}

#main{
    height: calc(95vh - 1rem);
    position:relative;
    display: flex;
    flex-direction: column;
    top: -11px;
}

#form, .form{
    width: 100%;
    padding-right: 1.9rem;
    border: 1px solid #6c757d;
    border-radius: 5px;
    flex-grow: 0;
}
.form{
    border: none;
}
#form{
    background-color: #eee;
    margin-bottom: 0.8rem;
    -webkit-box-shadow: 0px 0px 15px 3px rgba(0,0,0,0.46); 
    box-shadow: 0px 0px 15px 3px rgba(0,0,0,0.46);
    position: relative;
}
#form .row, .form form .row{
    margin: 10px 10px;
}

#form, .form form{
    padding : 10px;
}

#form button, .form button{
    width: 100%;
    background-color: #fff;
}

.btn-secondary{
    background-color: #6c757d !important;
}
.btn-secondary:hover{
    background-color: #fff !important;
    color: #6c757d !important;
}

#form button:hover, .form button:hover{
    background-color: #6c757d;
}

#form .parent-question button
{
    width: auto;
    position: absolute;
    top: 10px;
    right: 30px;
    z-index: 2;
}

#form textarea:focus{
    height: 20vh;
}

#responses{
    overflow-y: scroll;
    width: 100%;
    margin-bottom: -5px;
    margin-top: 5px;
    flex-grow: 1;
    padding-bottom: 100px;
}

.offcanvas-start,  .offcanvas-end{
    width: 45% !important;
    height: 100vh;
}

.offcanvas-top {
    height: 22.5rem !important;
    margin: 0;
}

.offcanvas-top-admin {
    height: 90vh !important;
}

#stats-tab-pane{
    height: calc(90vh-9rem);
    overflow-x: hidden;
    overflow-y: scroll;
}

#stats-tab-pane::-webkit-scrollbar:horizontal{
    display:none!important;
}


.offcanvas-top-admin ul{
	padding-left: 1rem;
	padding-right: 1rem;
}
.offcanvas-top-admin .tab-content{
	padding : 1rem;
}

button.nav-link{
	background-color: inherit !important;
}
.offcanvas-top .form, .offcanvas-top form{
    margin: 0;
    padding: 0;
}

.offcanvas-start,  .offcanvas-end, .offcanvas-bottom, .offcanvas-top {
    border-radius: 5px;
}

.offcanvas-bottom, .offcanvas-top{
    width: 98%;
    margin-left: 1%;
}

 .offcanvas-bottom{
    height:15rem !important;
}

#historyTrigger{
    height: 100vh;
    z-index: 1000;
    padding-top:1rem;
    padding-bottom: 0.8rem;
    flex-grow: 0;
    margin-left:0.5rem;
}

#historyTrigger button, #promptTrigger button{
    
    height: 100%;
    width:2.8rem;
    -webkit-box-shadow: 0px 0px 15px 3px rgba(0,0,0,0.46); 
    box-shadow: 0px 0px 15px 3px rgba(0,0,0,0.46);
}

#historyTrigger button span, #promptTrigger button span{
    writing-mode: vertical-rl;
    text-orientation: mixed;
    font-size: 1.2rem;
    margin-left: -0.25rem;
}

#promptTrigger{
    height: 100vh;
    z-index: 1000;
    padding-top:1rem;
    padding-bottom: 0.8rem;
    flex-grow: 0;
    margin-right:0.5rem;
}

.centre-div{
    height: 100vh;
}

.top-bar{
    height:2.5rem;
    margin-top:1rem;
}

.top-bar button, .top-bar a{
    -webkit-box-shadow: 0px 0px 15px 3px rgba(0,0,0,0.46); 
    box-shadow: 0px 0px 15px 3px rgba(0,0,0,0.46);
}

#global{
    display: flex;
}

#prompt_save{
    margin-left : 20px;
}

.promptForm{
    margin-top: 10px;
}

#promptFormNew{
    padding-bottom: 1rem;
}

#promptForm{
    background-color: #eee;
    padding: 1rem;
    border-radius: 5px;
    -webkit-box-shadow: 0px 0px 15px 3px rgba(0,0,0,0.46); 
    box-shadow: 0px 0px 15px 3px rgba(0,0,0,0.46);
    position: relative;
}

#promptForm button{
    background-color: #fff
}

#promptForm textarea{
    height: 15vh;
}

#promptForm button:hover{
    background-color: #6c757d;
}

.prompt-use.float-start {
	padding: 0;
	margin: 0.3rem 0.5rem;
	width: 6.5rem;
}

.form-overlay{
    height: 100%;
    width: 100%;
    position: absolute;
    top: 0;
    left: 0;
    background-color: rgba(0,0,0,0.5);
    z-index: 1000;
    border-radius: 5px;
}
.form-overlay .spinner{
    position:absolute;
    top:50%;
    left: 50%;
    transform: translateY(-50%) translateX(-50%);
}

.accordion-button:not(.collapsed){
    color: #fff;
    background-color: #6c757d;
}

.accordion-button:focus{
    border-color: #333;
    box-shadow: 0 0 0 0.25rem rgba(110,110,110,.25);
}

.accordion-button:not(.collapsed)::after, .accordion-button.collapsed:hover::after
{
    filter: brightness(0) saturate(100%) invert(100%) sepia(0%) saturate(1%) hue-rotate(8deg) brightness(109%) contrast(102%);
}

.accordion-button.collapsed:hover{
    color: #fff;
    background-color: #6c757d;
}

.accordion-button:not(.collapsed):hover{
    color: #6c757d;
    background-color: #eee;
}

.accordion-button:not(.collapsed):hover::after
{
    filter: brightness(0) saturate(100%) invert(44%) sepia(11%) saturate(361%) hue-rotate(166deg) brightness(99%) contrast(89%);
}

#ParentQuestion{
    padding-right: 85px;
}
 
.error{
    color: var(--bs-red);
}

.top-btn{
    display: inline-block;
    width:calc(33.33vw - 0.5rem - 2.8rem - 1rem);
}

.bg-body-tertiary {
    --bs-bg-opacity: 1;
    background-color: rgba(33, 37, 41, 0.1) !important;
    margin: 0 5vw;
    -webkit-box-shadow: 0px 0px 15px 3px rgba(0,0,0,0.46); 
    box-shadow: 0px 0px 15px 3px rgba(0,0,0,0.46);
}

.rounded-3{
    border-radius: 3rem !important;

}

.print-button, .copy-button, .copy-format-button {
    margin-right: 1rem;
    font-size: 1.5rem;
    text-decoration: none;
    color: #333;
}

#searchHistory{
    direction: ltr;
    padding: 0.4rem 1rem;
}
#searchHistory .col-left{
    padding-right: 0.2rem;
}
#searchHistory .col-right{
    padding-left: 0.2rem;
}

.accordion-item{
    border-left-width: 0.3rem;
}

#toasts{
    position: fixed !important;
    top: 4rem;
    left: 4rem;
    z-index: 1000;
}


code[class*=language-], pre[class*=language-] {
    font-size: 0.95rem !important;
}

@media (max-device-height: 1024px) {
    #main{
        top: -5px;
    }
    #page{
		max-width: 100vw;
	}
    #toasts{
        left: 1rem;     
    }
}

.icon-btn svg{
    width: 1.5rem;
    height: 1.5rem;
}

.rotate-90>span>svg{
    transform: rotate(90deg);
    margin-right: 0.75rem;
    margin-bottom: 0.5rem;
}

h5 svg{
   width: 2rem; 
   height: 2rem;
}



@media only screen 
  and (max-device-width: 768px)
  and (-webkit-min-device-pixel-ratio: 2)
  and (orientation: portrait) {

    html {
        font-size: 28px;
    }
    .offcanvas-start,  .offcanvas-end{
        width: 100% !important;
        
    }
    #main{
        height: 88vh;
        padding-right: 0px;
        padding-left: 0px;
        top: 0px;
    }
    .offcanvas-bottom{
        height:25rem !important;
    }
    .centre-div, #page{
        height: 50vh;
    }
	#page{
		max-width: 100vw;
	}
    #form{
        margin-bottom: 80px;
        width:98vw;
        margin-left:1vw;
    }

    #form textarea:focus{
        height: 40vh;
    }
    .questions{
        margin : 0.8rem;
    }
    .question{
        margin-left: 0;
        margin-right: 0;
        margin-bottom:1rem;
    }
    .accordion-body .question{
        margin-bottom: 1rem;
    }
    .accordion-button:not(.collapsed):hover{
        color: #fff;
        background-color: #6c757d;
    }
    .accordion-button:not(.collapsed):hover::after
    {
        filter: brightness(0) saturate(100%) invert(100%) sepia(0%) saturate(1%) hue-rotate(8deg) brightness(109%) contrast(102%);
    }
    button.question-continue {
        position: static;
    }
    
    #form .parent-question button
    {
        position: static;
        margin-left: 0.5rem;
    }
    #ParentQuestion{
        padding-right: 0px;
    }
    
    .question{
        position:relative;
        padding-right: 0px !important;
    }
    
    .alert-dismissible .btn-close{
        padding: 0.5rem 0.5rem;
    }
    
    .offcanvas-top {
        height: 35rem !important;
    }

	.offcanvas-top-admin {
	    height: 100vh !important;
	}

    .top-btn{
        width: 22vw;
    }
    
    .bg-body-tertiary {
        margin: 2rem 2rem !important;
    }

    #page .icon-btn{
        padding-right: 0;
        padding-left: 0;
    }
    
    #accordionHistory  .accordion-body .icon-btn {
		font-size: 0.95rem;
		padding: 0.5rem;
	}


	#accordionHistory .accordion-body .icon-btn svg {
	    width: 1.2rem;
	    height: 1.2rem;
	}

}




