@import url("theme.css");
@import url('widgets.css');
@import url('fileExplorer.css');

@import url('projectInformations.css');
@import url('requirements.css');
@import url('design.css');
@import url('testLab.css');
@import url('dashboard.css');

body, html {
    margin: 0;
    padding: 0;
}

body {
    display: flex;
    min-height: 100vh;
    background-color: var(--bg);
    color: #c5c6c7;
}

aside {
    position: fixed;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 50px;
    height: 100vh;
    background-color: var(--bg);
    transition: 0.5s;
}

#leftSide {
    left: 0;
    border-right: 2px solid black;
}

#leftSide #appName {
    margin-top: 2px;
    font-size: 1.4em;
    font-weight: bold;
    color: var(--text);
    color: var(--text);
}

#leftSide #appName img {
    margin-top: 14px;
    margin-right: 10px;
}

#leftSide #appName span {
    color: var(--blue);
}

#leftSide div {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    width: 100%;
    height: 100%;
}

#leftSide button {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: left;
    width: 100%;
    height: 50px;
    color: var(--text);
    border-radius: 0;
    border: none;
    outline: none;
    min-width: 0;
    padding: 3.5px;
    background: transparent;
    cursor: pointer;
    overflow: hidden;
}

#leftSide button:hover {
    background: var(--hover);
}

#leftSide button .icon {
    position: relative;
    top: 0px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-width: 50px;
    min-height: 50px;
    max-width: 50px;
    max-height: 50px;
    font-size: 1.5em;
    color: var(--text);;
}

#leftSide button .icon svg, #leftSide button .icon img {
    width: 26px;
}

#leftSide button span {
    position: relative;
    display: flex;
    white-space: nowrap;
}

#leftSide.active {
    width: 260px;
}

button.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(45deg, var(--blue), var(--darkBlue));
    transition: 0.5s;
}

#leftSide.active ~ .content{
    margin-left: 260px;
}

body:has(#rightSide.active) .content {
    margin-right: 400px;
}

.content {
    position: relative;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    min-height: 0;
    -height: 100%;
    padding: 20px;
    background-color: var(--content);
    margin-left: 50px;
    margin-right: 50px;
    transition: 0.5s;
}

header {
    display: flex;
    align-items: top;
    height: 45px;
    margin-bottom: 10px;
}

h1 {
    margin: 0px;
    padding: 0px;
    color: var(--title);
}

header h1 {
    line-height: 45px;
}

header div:first-of-type {
    line-height: 45px;
    text-align: center;
    flex-grow: 1;
}

header button {
    margin: 0px 5px 0px 5px;
}

header svg {
    width: 24px;
    cursor: pointer;
    margin-left: 20px;
}

#project-name, .lastUpdate {
    color: var(--blue);
}

.group-box {
    border: 1px solid var(--hover);
    border-radius: 5px;
    padding: 0px 20px 20px 20px;
    margin: 20px 0;
    background: var(--bg);
    position: relative;
}

.group-box-title {
    padding: 0 10px;
    font-size: 1.2em;
    color: var(--title);
    background-color: var(--underBG);
    border: 1px solid var(--hover);
    border-radius: 5px;
    position: absolute;
    top: -12px;
    left: 10px;
}

.group-box-content {
    margin-top: 20px;
}

h1, h2 {
    color: #ffffff;
}


#viewContent code {
    font-family: monospace !important;
    background-color: #333333;
    color: #ffffff;
    -padding: 0px;
    border-radius: 5px;
    overflow: auto;
}


ul li::before {
    color: #ffffff;
    display: inline-block; 
    width: 1em;
    margin-left: -1em;
}

#markdown-editor * {
    font-family: monospace;
}


/* --- Right side --- */

#rightSide {
    right: 0;
    display: flex;
    flex-direction: row;
    height: 100vh;
}

#rightSide.active {
    width: 400px;
}

#rightPane {
    position: relative;
    width: calc(100% - 50px);
    height: 100vh;
    overflow: hidden;
    z-index: 10000;
}

#fixRightBar
{
    position: fixed;
    right: 0;
    border-left: 2px solid black;
    /*background: #126ea3;*/
    width: 50px;
    height: 100vh;
}

#fixRightBar button
{
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 50px;
    color: var(--text);
    border-radius: 0;
    border: none;
    outline: none;
    min-width: 0;
    padding: 3.5px;
    background: transparent;
    cursor: pointer;
    overflow: hidden;
}


/* --- Workspace dialog box --- */
.workspace-data-content {
    display: flex;
    justify-content: center;
    align-items: center;
}

.workspace-data-content {
    position: relative;
    margin-bottom: 20px;
    height: 40px;
}

.workspace-data-content label {
    white-space: nowrap;
    margin-right: 10px;
    color: var(--text);
    width: 160px;
}

.workspace-data-content select,
.workspace-data-content input {
    flex-grow: 1;
}


.project-list {
    list-style-type: none;
    padding: 0;
}

.project-item {
    padding: 10px;
    margin: 10px 0;
    background: var(--bg);
    border: 2px solid var(--underBG);
    color: var(--title);
    font-size: 1em;
    border-radius: 5px;
    cursor: pointer;
    transition: 0.5s;
}

.project-item:hover {
    background-color: var(--blue);
}

.project-list img {
    vertical-align: top;
    position: absolute;
    right: 30px;
    width: 20px;
    height: 20px;
    cursor: pointer;
    transition: all 0.5s;
    filter: grayscale(100%);
    opacity: 0.3;
}

.project-list img:hover {
    filter: grayscale(0%);
    opacity: 1;
}

.lightbox-content {
    z-index: 10000;
}

.please-wait-light-box {
    position: absolute;
    display: flex;
    top: 0px;
    left: 0px;
    width: 100%;
    height: 100%;
    backdrop-filter: blur(5px);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.please-wait-light-box .spinner {
    border: 8px solid var(--title); /* Light grey */
    border-top: 8px solid var(--blue); /* Blue */
    border-radius: 50%;
    width: 120px;
    height: 120px;
    animation: spin 2s linear infinite;
}


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

.lightbox-settings {
    width: 800px;
}

.lightbox-settings .tool-section {
    display: flex;
    flex-direction: column;
}

.lightbox-settings .setting-row {
    display: flex;
    width: 100%;
}

.lightbox-settings .setting-row label {
    width: 160px;
}

.lightbox-settings .setting-row input {
    flex-grow: 1;
}



.lightbox-settings div {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.lightbox-settings label {
    margin-right: 10px;
    font-size: 16px;
}

/* switch-esn {
    margin-left: auto;
} */

/* largeur de la scrollbar */
::-webkit-scrollbar {
  width: 12px;
  height: 12px; /* pour scroll horizontal */
}

/* fond (track) */
::-webkit-scrollbar-track {
  background: #f0f0f0;
  border-radius: 4px;
}

/* la “barre” de défilement (thumb) */
::-webkit-scrollbar-thumb {
  background-color: #888;
  border-radius: 4px;
  border: 3px solid #f0f0f0; /* pour laisser un margin autour */
}

/* au survol */
::-webkit-scrollbar-thumb:hover {
  background-color: #555;
}

/* Popup de gestion de l'utilisateur */
.connectedUserPopup {
    position: fixed;
    bottom: 20px;
    right: 50px;
    background: var(--bg);
    border: 1px solid var(--hover);
    border-radius: 5px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.5s ease;
    overflow: hidden;
    min-width: 200px;
    z-index: -1000;
}

.connectedUserPopup.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    z-index: 1000;
}

.connectedUserPopupItem {
    padding: 14px 20px;
    color: #fff;
    cursor: pointer;
    transition: background 0.2s ease;
    border-bottom: 1px solid #333;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.connectedUserPopupItem:last-child {
    border-bottom: none;
}

.connectedUserPopupItem:hover {
    background: #3a3a3a;
}
