/***************/
/*** IMPORTS ***/
/***************/

@font-face {
    font-family: 'GlacialIndifference Regular';
    src: url('fonts/glacial-indifference/GlacialIndifference-Regular.otf') format('truetype');
}
@font-face {
    font-family: 'GlacialIndifference Italic';
    src: url('fonts/glacial-indifference/GlacialIndifference-Italic.otf') format('truetype');
}



/**************/
/* BACKGROUND */
/**************/

body {
    background-color: #111;
    margin: 0;
    padding: 60px;
    padding-bottom: 0px;
    height: calc(100vh - 80px);
}

.layer_wrapper {
    z-index:-1;
    overflow: hidden;
    position: fixed;
    right: 0px;
    top: 0px;
    width: 100vw;
    height: 100vh;

}

.background-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.75;
    object-fit: cover;
}



/*****************/
/*** ECRITURES ***/
/*****************/

h1 {
    display: block;
    margin: 20px;
    font-family: 'GlacialIndifference Regular', sans-serif;
    font-size: 60px;
    font-weight: 100;
    color : #fff;
    text-align: center;
}


label {
    margin: 20px 0px;
    font-family: 'GlacialIndifference Regular', sans-serif;
    font-weight: 300;
    font-size: 20px;
    color: #fff;
    display: block;
    padding-top: 5px;
}

h2, span {
    position: relative;
    text-align: center;
    color: #fff;
    font-weight: 300;
    font-family: 'GlacialIndifference Regular', sans-serif;
    font-size: 25px;
    display: block;

}

p {
    font-family: 'GlacialIndifference Regular', sans-serif;
    text-align: justify;
    color: #fff;
    opacity: 0.5;
    font-weight: 100;
    font-size: 20px;
    text-align: center;
}



/************/
/* SECTIONS */
/************/

header {
    z-index: 2;
    position: relative;
}

main {
    position: relative;
    z-index: 3;
    padding: 40px 0px;
}

footer {
    display: block;
    position: relative;
}



/************/
/*** MAIN ***/
/************/
.dashboard {
    position: relative;
    display: grid;
    grid-template-columns: repeat(4, 350px);
    grid-template-rows: repeat(3, 400px);
    grid-gap: 40px;
    margin: auto 100px;
    height: auto;
    /*     grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));    */
}

.panel {
    /* border: 1px solid #ccc; */
    background-color: rgba(53, 53, 53, 0.5);
    padding: 10px;
    border-radius: 20px;
    box-shadow: 0 0 40px #0088ff30;
}

.cpu-panel {
    grid-column: 1;
    grid-row: 1;
}
  
.memory-panel {

}
  
.storage-panel {
  
}
  
.traffic-panel {
    grid-column: span 3 / span 4;

}

.alerts-panel {
    grid-column: 4;
    grid-row: span 2 / span 3;
}

.sys-panel {
    grid-column: span 3 / span 4;
}



/***************/
/*** TRAFFIC ***/
/***************/
.traffic-title{
    margin-bottom: 0px;
} 

.traffic-panel {
    display: grid;
    grid-template-rows: auto 1fr; /* Première ligne pour le titre, deuxième ligne pour le graphique */
    grid-gap: 10px;
}
  
#line-chart {
    width: 100%; /* Pour remplir la largeur disponible */
    height: 100%; /* Pour remplir la hauteur disponible */
}



/*******************/
/*** SPEEDOMETER ***/
/*******************/
:root {
    --cpu-load-perc: 0;
    --mem-usage-perc: 0;
    --disk-usage-perc: 0;

    --disk-usage-perc: 0;
    --disk-usage-perc: 0;
    --disk-usage-perc: 0;
}

.meter {
    height: 200px;
    display: block;
    margin-left: auto;
    margin-right: auto;
    color: #fff;
    transition: transform 0.3s ease; 
    z-index: 5;
} .meter:hover {
    transform: scale(1.1); 
    cursor: pointer;
}

@keyframes rotate-cpu {
    from {
        transform: rotate(-140deg); 
    }
    to {
        transform: rotate(var(--cpu-load-perc));
    }
}
.aiguille-svg-cpu {
    animation: rotate-cpu 5s linear forwards; 
    transform-origin: 50% 57%;
}

@keyframes rotate-mem {
    from {
        transform: rotate(-140deg); 
    }
    to {
        transform: rotate(var(--mem-usage-perc));
    }
}
.aiguille-svg-mem {
    animation: rotate-mem 5s linear forwards; 
    transform-origin: 50% 57%;
}
@keyframes rotate-disk {
    from {
        transform: rotate(-140deg); 
    }
    to {
        transform: rotate(var(--disk-usage-perc));
    }
}
.aiguille-svg-disk {
    animation: rotate-disk 5s linear forwards; 
    transform-origin: 50% 57%;
}


/**************/
/*** LEGEND ***/
/**************/
.custom-legend {
    display: flex;
    align-items: center;
}

.legend-item {
    margin-right: 20px;
    display: flex;
    align-items: center;
    font-size: 15px;
    text-align: end;
}

.legend-color {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 5px;
}

.blue {
    background-color: #3e95cd;
}

.green {
    background-color: rgba(164, 128, 207, 1);
}
  


/**********/
/* ALERTS */
/**********/
.alerts {
    display: block;
    background-color: rgba(159, 159, 159, 0.5);
    border-radius: 20px;
    position: relative;
    margin: 10px;
    padding-left: 15px;
    padding-right: 15px;
}

.alerts label, 
.alerts p {
    display: inline-block;
    font-size: 20px;
    color: #fff;
    opacity: 1;
    font-weight: 100;
    padding-top: 0px;
}



/**********/
/* POP-UP */
/**********/
.pop-up {
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: #171717;
    margin: 20vh auto;
    padding: 20px;
    max-width: 1000px;
    border-radius: 20px;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}


/*** centrer mon image en toute circonstances : 
transform: rotate(+60deg);
  position: absolute;
  top: -9999px;
  right: -9999px;
  left: -9999px;
  bottom: -9999px;
  margin: auto; ***/ 


.hidden {
    display: none;
}