:root{
    --ui-font:'Carrosserie Med';
    --title–font: 'BBBPoppins-bold';
    --current-font: 'BBBPoppins';
    --margin-border: 40px;
    --margin-top: 40px;
    --margin:40px;
    --small-margin: 20px;
    --thin-margin: 10px;
    --title-line-height: 1.4rem;
    --gap: 34px;
    --bg-color:#FFF59B;
    --img-color: #92892F;
    --color:#92892F;
    --footer-color: #92892F;
    --inverse-color: #FFF8DD;
    /* --current-size: clamp(1rem, 0.833vw + 0.583rem, 1.25rem); */
    /* --current-size: clamp(0.875rem, 0.625rem + 1vw, 1.125rem); */
    --current-size: 16px;
    --line-height: 1.2rem;
    --line-height-ui: 1.25rem;
    --letter-space-ui: 0.5px;
    --title-ui-size: calc(var(--current-size)*1.15);
    --title-project-size: 26px;
}

body{
    background-color: var(--bg-color);
    font-family: var(--current-font);
    font-size: var(--current-size);
    color: var(--color);
    box-sizing: border-box;
    width: 100%;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-rows: auto;
    height: 100%;
    
}

img{
    width: 100%;
}
a{text-decoration: none;
color: var(--color)}
h1, h2, p, ul,h3{
    margin: var(--thin-margin) 0;
    font-size: var(--current-size);
    line-height: var(--line-height);
    font-weight: normal;
}
ul{list-style-type: "– ";
margin: 0;
padding-left: 18px;
}

dd{margin: 0}
header, footer{ 
    font-family: var(--ui-font);  
}
header,
#contacts
{
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    justify-items: center;
    align-content: center;
}
main{
    padding: 0 var(--margin-border) var(--margin-border) var(--margin-border);
}
#projects{
    width: 100%;
    /* grid solution */
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-gap: var(--gap);
    align-items: start;
}
/* .column{
    display: grid;
    grid-template-areas: auto;
    gap: var(--gap);
    max-height: 100%;
} */
/* Header */
header {
    padding-top: var(--margin-border);
    padding: var(--gap) calc(var(--margin-border)*6);
    text-align: center;
}
.break-line {
    display: flex;
    flex-direction: column;
}

header #logo{
    width: 13vw;
}
header h2{
    font-size: var(--title-ui-size);
    letter-spacing: var(--letter-space-ui);
    margin: 0;
}
header #mention,
header #place{
    display: flex;
    justify-content: center;
    align-items: center;
}
/* footer */

#contacts{
    background-color: var(--footer-color);
    color: var(--inverse-color);
    position: relative;
    z-index: 99;
    text-align: center;
    padding: var(--thin-margin) calc(var(--margin-border)*6);
    letter-spacing: var(--letter-space-ui);
}
#contacts svg{
    width: 10vw;
    fill: var(--inverse-color);
}
#contacts a{
    color: var(--inverse-color);
}
#about{
    background-color: var(--inverse-color);
    margin: 0;
    padding: var(--small-margin) var(--margin-border);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    z-index: 99;
}
#about p, #about h3 {
    font-family: var(--current-font);
    font-weight: normal;
    font-size: var(--current-size);
    line-height: var(--line-height-ui);
}
#about h3{
    font-family: var(--ui-font);
}
#adress-footer,
#contact-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--current-size);

}
#adress-footer p {
    display: block;
    margin: 0;
    font-size: var(--current-size);
}
#menu{
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    font-weight: normal;
    font-size: var(--current-size);
    width: 100vw;
    position: fixed; 
    bottom: 0;
    z-index: 95;
    background-color: var(--bg-color);
    --small-margin: 15px;
    
}
#menu>* {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: var(--thin-margin) 0;
    
}

#menu > *:nth-child(2){
    background-color: var(--inverse-color);
    color:#2e3122ff;
}

#menu>*:nth-child(3) {
    background-color: var(--color);
    color: var(--inverse-color);
    grid-column: span 2;
}
/* Projects */
.project{
    width: 100%;
    position: relative;
    display: block;
    height: 50.5vw;
}
.project-header,.description{
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: 1fr;
}
.project h1, .project ul{
    margin: 0;
}
.project .infos{
    margin-top: var(--thin-margin);
}
.infos{
    position: relative;
    max-height: 100%;
}
.project h1{
    font-family: var(--title–font);
    font-weight: bold;
    text-transform: uppercase;
    line-height: var(--title-line-height);
}

.project-header, .project .description{
    font-size: var(--current-size);
}
.project-header ul {
    display: inline-flex;
    align-items: center;
    justify-content: end;
    grid-column: 2/4;
    list-style-type: none;
    line-height: var(--title-line-height);
}
.project-header li{
    word-break: keep-all;
}
.project-header li:after{
    content: ' / ';
}
.project-header li:last-child::after {
    content: '';
}
.details{
    grid-column: 1 / 4;
    grid-row: 1/2;
}
svg{fill: var(--color)}
.description input, .button{
    width: 2rem;
    height: var(--current-size);
    grid-column: 4 / 5;
    grid-row: 1/2;
    justify-self: end;
    padding: 0;
    margin: 0;
}
.description input{
    opacity: 0;
}
.description input:hover {
    cursor: pointer;
}
.description{
    overflow: hidden;
    /* superpose details on next project */
    position: absolute;
    z-index: 90;
    background: var(--bg-color);
    margin-top: var(--thin-margin);
    
}
/* last to project expand the body */
.project:nth-last-child(-n+2) .description {
    position: relative;
}
.project:nth-last-child(-n+2){
    height: auto;
}
/* Readmore with checkbox */
.description input:checked ~ .details {
    max-height: 100%;
}
.readmore {
    position: absolute;
    margin: 0;
}
.details>*:first-child,
.details article *:first-child {
    margin-top: 0;
}
.details article {
    display: none;
    padding-bottom: var(--small-margin);
}
.details h2{
    margin-bottom: 0;
    font-family:var(--title–font);
}
.description input:checked~.details>article {
    display: block;
}

.description input:checked~.details>.readmore {
    display: none;
}

/** Swwiper styles **/
.swiper{
    border-radius: 2%;
    margin: 0;
}
.swiper-slide {
    text-align: center;
    font-size: 18px;
    background: var(--color);
    display: flex;
    /* justify-content: center;
    align-items: center; */
    
}
/* swiper */
.swiper img {
    display: block;
    width: 100% !important;
    height: 100%;
    object-fit: cover;
    
}

.swiper {
    margin-left: auto;
    margin-right: auto;
}

.swiper-button-prev,
.swiper-button-next{
    margin: var(--small-margin);
}
.swiper-button-prev svg, .swiper-button-next svg {
    width: 90%;
    height: 90%;
    fill: var(--bg-color);
}
.swiper-button-prev::after,
.swiper-button-next::after {
    content: none;
}
/* English */
.en{
    --bg-color:#FFF8DD;
    ;
    --color:#000000;
    --footer-color:#000000; 
    --inverse-color:#FFFDEE;
}

.en svg{
    fill: var(--color);
}

.en #menu>*:nth-child(2) {
    background-color: var(--bg-color);
}

.en #menu >*:nth-child(1){
    background-color: #FFF59B;
}

@media screen and (max-width: 920px) {
    body{
        --margin-border: 20px;
        --thin-margin: 3px;
        --gap: 20px;
        --current-size:14px;
        --title-ui-size: 13px;
        --line-height: 1rem;
        --title-line-height: var(--line-height);
        --line-height-ui: var(--line-height);
    }
    header,
    #projects{
        grid-template-columns: repeat(1, 1fr);
        grid-row-gap: var(--gap);
    }
    main{
        padding-bottom: var(--gap);
    }
    header,
    #contacts {
      padding: var(--small-margin) var(--margin-border);
    }
    header{
        grid-row-gap: var(--thin-margin);
        padding-top: var(--margin);
    }
    header br{
        display: none;
    }
    #menu > *{
        --thin-margin: 6px;
    }
    .project{
        height: inherit;
        --thin-margin: 4px;
    }
    .project .infos{
        margin-top: 10px;
    }
    .project-header{
        grid-template-rows: repeat(2,1fr) ;
        grid-row-gap: var(--thin-margin);
        
    }
    .project-header h1{
        grid-column: span 4;
    }
    .project-header ul{
        justify-content: start;
        padding: 0;
        grid-column: span 4;
        grid-row: 2/3;
        
    }

    .description, .readmore{
        position: inherit;
        background: inherit;
    }
    .details article{
        padding-bottom: 0;
    }
    

    #about {
        --thin-margin: 6px;
        padding:var(--thin-margin) var(--margin-border);
    }
    #contacts{
        --small-margin: 12px;
    }
    #adress-footer p, #contact-footer, #menu{
        font-size: calc(var(--current-size)/1.4);
        line-height: 1;
    }
    header #logo{
        width: 42vw;
    }
    #contacts svg {
        width: 30vw;
    }  
    header #place{display: none;}
    header #mention{
        grid-row-start: 2;
    }
    header .break-line{
        display: inline;
    }
    #about p, #about h3{
        font-size: var(--title-ui-size);
    }
    .swiper-button-next,
    .swiper-button-prev {
        --small-margin: 6px;
    }
    .swiper-button-prev svg,
    .swiper-button-next svg{
        width: 50%;
        height: 50%;
    }
}