/***************/
/*** 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');
}



/****************/
/*** WRITINGS ***/
/****************/

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 {
    position: relative;
    text-align: center;
    color: #fff;
    font-weight: 300;
    font-family: 'GlacialIndifference Regular', sans-serif;
    font-size: 25px;
    display: block;

}

p, 
span {
    font-family: 'GlacialIndifference Regular', sans-serif;
    text-align: justify;
    color: #fff;
    opacity: 0.5;
    font-weight: 100;
    font-size: 20px;
    text-align: center;
}

p.logs{} 



/**************/
/* 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;
}



/************/
/* SECTIONS */
/************/

header {
    z-index: 2;
    position: relative;
}

main {
    position: relative;
    z-index: 3;
    padding: 40px 0px;
}

footer {
    display: block;
    position: relative;
}



/************/
/*** MAIN ***/
/************/

.container{
    width: 80vw; 
    margin: 0 auto;
}

.dashboard {
    position: relative;
    display: grid;
    grid-template-rows: repeat(2, 350px);
    grid-gap: 50px;
    margin: auto;
    height: 750px;
    width: 1000px;
    grid-template-columns: repeat(3, 1fr);
}



/*************/
/*** CASES ***/
/*************/

.panel {
    /* border: 1px solid #ccc; */
    background-color: rgba(53, 53, 53, 0.5);
    padding: 10px;
    border-radius: 20px;
    box-shadow: 0 0 40px #0088ff30;
    text-align: center; 
}

.web-serv-panel {
    grid-column: 1;
    grid-row: 1;
}
  
.bdd-serv-panel {
    grid-column: 2;
    grid-row: 1;
}
  
.storage-panel {
    grid-column: 3;
    grid-row: 1;
}
  
.traffic-panel {
    grid-column: 1;
    grid-row: 2;
}

.alerts-panel {
    grid-column: 2;
    grid-row: 2;
}

.sys-panel {
    grid-column: 3;
    grid-row: 2;
}



/***************/
/* SVG BUTTONS */
/***************/

.action-button{
    display: inline-block;
    height: 40px;
    width: 40px;
}

.state-button {
    height: 50px;
    width: 50px;
    display: block;
}

.state-buttons-div,
.action-buttons-div {
    position: relative;
    margin: 20px auto;
    text-align: center; 
}

.state-button {
    display: block; 
    margin: 0 auto; 
}
.action-button {
    margin: 0px 10px;
}

.state-button-up,
.action-button-start {
    fill: greenyellow;
}
.state-button-load,
.action-button-restart {
    fill: orange;
}
.state-button-down,
.action-button-stop {
    fill: crimson; 
}



/**********/
/* POP-UP */
/**********/
.logs-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);
}

#apache-logs {
    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;
}


/***************/
/*** 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;
}




/*** centrer mon image en toute circonstances : 
transform: rotate(+60deg);
  position: absolute;
  top: -9999px;
  right: -9999px;
  left: -9999px;
  bottom: -9999px;
  margin: auto; ***/ 


.hidden {
    display: none;
}