@font-face {
    font-family: 'ChiffChaff';
    src: url('font/ChiffChaff-Uprising.ttf') format('truetype');
}
@font-face {
    font-family: 'Authentic';
    src: url('font/authentic-sans-90.woff2') format('woff2');
}
@font-face {
    font-family: 'Bobonne';
    src: url('font/Bobonne-Regular.woff2') format('woff2'),
       url('font/Bobonne-Regular.woff') format('woff'),
       url('font/Bobonne-Regular.otf') format('opentype');
}
@font-face {
    font-family: 'Almendra';
    src: url('font/AlmendraDisplay-Regular.ttf') format('truetype');
}

html {
    box-sizing: border-box;
}

*, *::before, *::after {
    box-sizing: inherit;
}

body {
    margin: 0;
    padding: 0;
    background-color: #fefefe;
    font-family: 'Authentic', sans-serif;
}

h2 {
    font-family: 'ChiffChaff', serif;
    font-size: 2rem;
    margin-bottom: 1rem;
}

a {
    text-decoration:wavy underline #4c4c4c 1px;
    color: black;
    transition: transform 0.3s ease;
    display: inline-block; 
}

a:hover {
    transform: rotate(5deg);
}
/*-----HEADER-----*/
header nav{
    position: fixed;
    padding: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    font-family: 'chiffchaff', serif;
    z-index: 1000;
}

.logo img{
    width: 18rem;
    transition: transform 0.3s ease;
}

.infos img {
    width: 5rem;
}

.contact img {
    width: 3rem;
}

#info, .contact img {
    transition: transform 0.3s ease;
    display: inline-block; 
}

.contact a{
    margin: 0 0.5rem;
}

.contact2{
    display: none;
}

.logo img:hover {
    transform: rotate(5deg);
}

#info:hover, .contact img:hover{
    transform: rotate(20deg);
}

header nav .right{
    display: flex;
    align-items: center;
    gap: 20px;
}

/*-----SLIDE PANEL-----*/

#slide-panel {
    position: fixed;
    top: 9rem;
    right: 0;
    width: 40%;
    min-width: 30rem;
    height: calc(100vh - 10rem);
    background-color: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(5px);
    transition: right 0.4s ease;
    z-index: 1001;
    padding: 2rem;
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
}

#slide-panel.open {
    transform: translateX(0);
}

#info{
    cursor: pointer;
}

#close-panel {
    position: absolute;
    top: 0.5rem;
    left : 0.5rem;
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    transition: transform 0.3s ease;
}

#close-panel:hover {
    transform: rotate(20deg);
}

.etudes {
    margin: 1.5rem 0;
}

.etudes p{
    margin: 0.5rem 0;
}

/*---PROJETS---*/
main {
    padding: 9rem 8rem 0 8rem;
}

.controls {
    position: fixed;
    display: flex;
    margin-bottom: 2rem;
    gap: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
}

select {
    padding: 0.5rem;
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: #fefefe;
    cursor: pointer;
}

.container {
    margin-top:5rem;
}

.projetClick {
    display: flex;
    flex-direction: row;
    justify-content: space-around;
    gap: 2rem;
    margin : 2rem 0 2rem 0;
    text-decoration: none;
}
a.projetClick:hover {
    transform: none;
}
.projetClick .imgcadre {
    width: 40%;
    height: 20rem;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.imgcadre:hover {
    transform: rotate(5deg);
    transition: transform 0.3s ease;
}

.imgcadre img, .imgcadre video {
    max-width: 100%;
    max-height: 100%;
    height: auto;
    width: auto;
    object-fit: contain;
}

.txtblock {
    width: 60%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.tag {
    font-size: 0.9rem;
    margin-top: 2rem;
}

.description {
    display: -webkit-box;
    -webkit-line-clamp: 5; /* nombre de lignes */
    line-clamp: 5; /* standard property for compatibility */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.txtblock .flechebox {
    font-size: 2rem;
    text-decoration: none;
    margin-left: 80%;
    transition: transform 0.3s ease;
}

/*---FOOTER---*/
footer {
    margin-top: 2rem;
}
footer p {
    text-align: center;
    font-size: 0.9rem;
    margin-top: 0.8rem;
}

/*---RESPONSIVE ACCUEIL---*/
@media screen and (max-width: 950px) {
    .contact {
        display: none;
    }
    .contact2{
        display: block;
        margin-bottom: 1rem;
    }
    .contact2 img {
        width: 2.5rem;
        display: inline-block; 
    }

    .contact2 a{
        margin-left: 0.5rem;
    }

    header .logo img {
        width: 15rem;
    }
    header .infos img {
        width: 4rem;
    }
    #slide-panel {
        top: 8rem;
        height: calc(100vh - 8rem);
    }
    main{
        padding: 8rem 0 0 0;
    }
    .projetClick {
        flex-direction: column;
        align-items: center;
        gap: 0;
    }
    .projetClick .imgcadre {
        width: 90%;
        height: 25rem;
    }
    .imgcadre img{
        width: 100%;
        height: auto;
        margin-top: auto;
    }
    .txtblock {
        width: 90%;
    }
}

@media screen and (max-width: 580px) {
    .controls {
        gap: 0.5rem;
    }
    #slide-panel {
        width: 100%;
        min-width: 100%;
    }
}

@media screen and (max-width: 500px) {
    .controls {
        display: none;
    }
    main{
        padding-top: 6rem;
    }
    .projetClick .imgcadre {
        width: 90%;
        height: 20rem;
    }
}

/*---PROJETS AUTRE PAGE---*/
#main .flechebox a{
    position: fixed;
    font-size: 4rem;
    text-decoration: none;
    rotate: 180deg;
    transition: transform 0.3s ease;
    left: 5%;
    top: 10rem;
}
#main .projet_description{
    width: 70%;
    padding-left: 7rem;
    
}
#main h2 {
    font-size: 3rem;
}
.projet_img {
    display: flex;
    flex-flow: row wrap;
    gap: 1rem;
    justify-content: center;
    align-items: flex-start;
}

.projet_img img {
    width: 45%;
    height: auto;
    object-fit: contain;
}

/*---RESPONSIVE PROJET---*/
@media screen and (max-width: 1140px) {
    #main .projet_description {
        width: 80%;
        padding-left: 2rem;
    }
    .projet_img {
    flex-flow: column wrap;
    gap: 2rem;
    justify-content: center;
    align-items: center;
    }
    .projet_img img {
        width: 60%;
    }
}
@media screen and (max-width: 950px) {
    #main .projet_description {
        width: 90%;
        padding-left: 10rem;
    }
    .projet_img img {
        width: 65%;
    }
}

@media screen and (max-width: 768px) {
    .flechebox {
        display: none;
    }
    #main .projet_description {
        width: 90%;
        padding-left: 4rem;
    }
}

@media screen and (max-width: 425px) {
    #main .projet_description {
        width: 90%;
        padding-left: 2rem;
    }
    .projet_img img {
        width: 75%;
    }
    #main h2 {
        font-size: 2.5rem;
    }
}