body {
    margin: 0;
    padding: 0;
	background-image:url('../images/fond80.png');	
    background-color: white;
	display: grid;
    grid-template-rows: 100vh auto;	
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
   background: rgba(255, 255, 255, 0.6);
    pointer-events: none;
    z-index: -1;
}

#minitel-viewer {
    display: table;
    width: 100%;
    height: 100%;
	 grid-row: 1;
}
/*
x-minitel {
    display: table-cell;
    width: 100%;
    height: 100%;
    background-image: url(../images/minitel-background.png);
    background-position: center center;
    background-repeat: no-repeat;
    vertical-align: middle;
    text-align: center;
}
*/
.minitel-wrapper {
	position: relative;
	display: inline-block;
    width: auto;
    height: 38%;
	top: -7%;
	padding:0;
	margin:0;

}

.minitel-cursor {
    pointer-events: none;
	position: absolute;
    left: 0;
    width: 100%;
    height: 100%;
	top: -11%;
}
.minitel-screen {
	pointer-events: auto;
	position:relative;
    width: 100%;
    height: 100%;
}


#minitel-glass {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 95vh;
    background-image: url(../images/minitel-glass.png);
    background-position: center center;
    background-repeat: no-repeat;
}

x-minitel canvas {
    position: relative;
    overflow: auto;

    transform: rotate(0.8deg)
               perspective(159em)
               scaleZ(0.47)
               rotateX(-25.3deg)
               rotateY(-16deg)
               rotateZ(0.6deg);
}


x-minitel {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 95vh;

    background-image: url(../images/minitel-background.png);
    background-position: center center;
    background-repeat: no-repeat;
    background-size: auto 100%;
	
	position:relative;
}



@media  {
    x-minitel { background-size: auto 100%; }

    #minitel-glass { background-size: auto 100%; }
    
    x-minitel canvas {
        margin-top: 0;
        width: auto;
        height: 34%;
        top: -11%;
    }
}

/*
@media (min-aspect-ratio: 2065/2160) {
    x-minitel { background-size: auto 100%; }

    #minitel-glass { background-size: auto 100%; }
    
    x-minitel canvas {
        margin-top: 0;
        width: auto;
        height: 34%;
        top: -11%;
    }
}

@media (max-aspect-ratio: 2065/2160) {
    x-minitel { background-size: auto 100%; }

    #minitel-glass { background-size: auto 100%; }
    
    x-minitel canvas {
        margin-top: 0;
        width: auto;
        height: 34%;
        top: -5%;
    }

}
*/
/*
    x-minitel { background-size: 100% auto; }

    #minitel-glass { background-size: 100% auto; }

    x-minitel canvas {
        margin-top: -24%;
        left: -0.3%;
        width: 45%;
        height: auto;
    }
*/




object {
    width: 40em;
    max-width: 100%;
    height: auto;
}

/* Keyboard */
.minitel-keyboard button {
    padding: 0;
    height: 3.2em;
    margin: 0;
    width: 100%;
    background-color: #462e22;
    color: white;
    border: none;
    border-radius: 1em 0.4em 0.4em 0.4em;
    border: 0.3em solid #202020;
    text-shadow: 0.05em 0.05em 0.1em black;
    font-size: 65%;
}

.special button, .send button, .save button .switch button {
    text-shadow: 0.05em 0.05em 0.1em #462e22;
}

.special button { background-color: #a0795a; }
.send button { background-color: #a4943c; }
.save button { background-color: #ff943c; }

.switch button {
    width: 3em;
    background-color: blue;
}

.minitel-keyboard>div>div {
    display: flex;
    flex-wrap: wrap;
}

.minitel-keyboard>div>div>div { flex-grow: 1; }
.minitel-keyboard>div>div>div.switch { flex-grow: 0; }

.form-config {
    color: #ddd;
    font-family: sans-serif;
    text-align: left;
    font-size: 80%;
}

.config-color, .config-speed  {
    display: flex;
    align-items: center;
}

.config-speed { margin-top: 0.5em; }

.form-config label { width: 33%; }
.form-config select {
    flex-grow: 1;
    font-size: 95%;
}

.config-speed>div, .config-color>div { margin: 0.8em 0; }

.config-help {
    margin-top: 1em;
    column-count: 3;
    font-size: 85%;
}

.config-help kbd {
    display: inline-block;
    width: 2em;
    margin: 0 0.3em 0.4em 0;
    text-align: center;
    font-size: 150%;
    border: 0.05em solid white;
    border-radius: 0.3em;
}

.hidden { display: none; }
