.grid *, *:after, .grid *:before { -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; }

.grid {
	width: 70%;
	height: 86%;
    margin-left: 15%;
	margin-top:1.3%;
	padding: 15px;
	list-style: none;
	text-align: center;
}
/*
#texte p{
    margin-left: 20%;
	margin-top:1.3%;
    width: 60%;
    height: 86%;
    background: rgba(62, 62, 62, .97);
    padding: 15px;
    color: white;
    font-size: 1.5em;
    border:dashed 8px rgb(255, 106, 68);
}
*/

.grid ul li:first-child  {
	margin-top: 70px;
}

.grid li {
	display: inline-block;
	width: 212px;
	margin: 0 5px 15px 0;
	text-align: left;
	position: relative;
	-webkit-perspective: 1700px;
	-ms-perspective: 1700px;
	perspective: 1700px;
	-webkit-perspective-origin: 0 50%;
	-ms-perspective-origin: 0 50%;
	perspective-origin: 0 50%;
}

.grid figure {
	margin: 0;
	position: relative;
	-webkit-transform-style: preserve-3d;
	-ms-transform-style: preserve-3d;
	transform-style: preserve-3d;

}

.grid figure img {
	max-width: 100%;
	display: block;
	position: relative;
	border: solid 1px #3e3e3e;
}

.grid figcaption {
	position: absolute;
	top: 0;
	left: 0;
	padding: 5px;
	background: rgb(255, 106, 68);
	color: rgb(204,204,204);
}

.grid figcaption h3
{
	margin: 0;
	padding: 0;
	color: #3e3e3e;
    font-size: 1.2em;
}

.grid figcaption a 
{
	text-align: center;
	padding: 5px 10px;
	border-radius: 2px;
	display: inline-block;
	background: #3e3e3e;
	color: rgb(204,204,204);
}

.grid figure > div 
{
	overflow: hidden;
}

figcaption {
	height: 100%;
	width: 50%;
	opacity: 0;
	-webkit-backface-visibility: hidden;
	-ms-backface-visibility: hidden;
	backface-visibility: hidden;
	-webkit-transform-origin: 0 0;
	-ms-transform-origin: 0 0;
	transform-origin: 0 0;
	-webkit-transform: rotateY(-90deg);
	-ms-transform: rotateY(-90deg);
	transform: rotateY(-90deg);
	-webkit-transition: -webkit-transform 0.4s, opacity 0.1s 0.3s;
	transition: transform 0.4s, opacity 0.1s 0.3s;
}

figure:hover figcaption, figure.cs-hover figcaption 
{
	opacity: 1;
	-webkit-transform: rotateY(0deg);
	-ms-transform: rotateY(0deg);
	transform: rotateY(0deg);
	-webkit-transition: -webkit-transform 0.4s, opacity 0.1s;
	transition: transform 0.4s, opacity 0.1s;
}

figcaption a 
{
	position: absolute;
	bottom: 20px;
	right: 20px;
}


@media only screen and (max-width: 767px) {
    
    .grid li {
    width: 125px;
    }
.grid figcaption h3, .grid figcaption a 
    {
    font-size: 0.76em;
    }
}