* {
    box-sizing: border-box;
}

:root {
    --color1: #D89584;
    --color2: #F4F4F4;
}

body {
    margin: 0;
    font-family: Arial;
    line-height: 1.5;
}

iframe {
    width: 100%;
    border: none;
    height: 350px;
}

div.cover {
    background: url(../media/cover.jpg) no-repeat center/cover;
    height: 360px;
    position: relative;
}

img.cover-profile {
    height: 100px;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 50px;
}

h1 {
    color: white;
    text-align: center;
    font-size: 42px;
    margin-top: 10px;
    margin-bottom: 10px;
}
div.space {
    margin-block: 10px;
}
div.cover p {
    color: lightgray;
    text-align: center;
    margin-top: 8px;
    font-size: 14px;
}

div.cover-contact {
    position: absolute;
    top: 20px;
    left: 10px;
    border-left: 4px solid var(--color1);
    padding-left: 8px;
}

div.cover-contact p {
    text-align: left;
    margin-top: 0px;
    margin-bottom: 0px;
}

div.cover-contact p:first-child {
    margin-bottom: 14px;
}

div.cover-contact * {
    color: white;
    font-size: 14px;
}

.section {
    padding-left: 40px;
    padding-right: 40px;
    padding-top: 30px;
    padding-bottom: 30px;
    overflow: auto;
}

div.section-grise1 {
    background: url(../media/triangle2white.svg) no-repeat center bottom -1px/100%;
    background-color: var(--color2);
    padding-bottom: 70px;
}

div.section-grise2 {
    background: url(../media/triangle1white.svg) no-repeat center top/100%;
    background-color: var(--color2);
    padding-top: 60px;
}

h2 {
    text-align: center;
    font-size: 34px;
    margin-top: 0px;
}

div.separateur {
    background-color: #979797;
    height: 1px;
    width: 150px;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
}

div.section-grise1 p {
    font-size: 22px;
    color: #656565;
    text-align: center;
    max-width: 450px;
    margin-left: auto;
    margin-right: auto;
}

img.col-contenu {
    width: 40%;
}

.col-contenu {
    width: 60%; 
    padding-left: 16px;
    text-align: center;
}

.float-right {
    float: right;
}

.profile-button {
    display: block;
    margin: 40px auto 0 auto;
}

.texte-avec-ligne-verticale {
    display: flex;
    align-items: center;
    text-align: left;
    border-left: 4px solid var(--color1);
    padding-left: 8px;
}

div.texte-avec-ligne-verticale p {
    margin: 0;
}

div.barre-verticale {
    height: 50px;
    width: 4px;
    background-color: var(--color1);
    margin-right: 8px;
}

.col-portfolio {
    width: 47%;

}

div.frame {
    margin: 30px 50px;
    padding: 20px 30px;
    background-color: white;
    box-shadow: 0px 0px 8px 8px rgba(0, 0, 0, 0.1);

}
.project-description {
    line-height: 1.8;
}

p.frame-title {
    font-size: 30px;
    margin-top: 5px;
    margin-bottom: 20px;
    text-align: center;
}

div.frame img {
    width: 100px;
}

div.texte-short {
    margin: 0;  
    padding: 0;
    line-height: 1.5;
    text-align: justify;
}

/* PORTFOLIO */
.portfolio-header {
    height: 90px;
    background: url(../media/header.jpg) no-repeat center/cover;
    position: relative;
    display: flex;
    justify-content: space-between;
    padding: 0 16px; 
}

.portfolio-header-title {
    font-size: 26px;
    font-weight: bold;
    color: white;
    padding-top: 4px;
    padding-left: 8px;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    padding: 0 20px;
}

div.portfolio-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    text-align: center;
    height: 100%; 
    padding: 20px;
    box-sizing: border-box;
}

h1.portfolio {
    font-size: 46px;
    color: black;
    line-height: 1;
    padding-top: 10px;
}

h2.portfolio {
    font-size: 26px;
    color: black;
    margin-bottom: 0;
    font-weight: normal;
    
}

a.portfolio-back {
    color: var(--color1);
    margin-left: -10px;
}

img.portfolio {
    width: 70%;
    max-width: 475px;
}

.portfolio-item img {
    width: 100%;
    height: 250px; 
    object-fit: cover; 
    align-items: center ;
    margin-bottom: 0px;
}

.portfolio-title {
    font-size: 18px;
    font-weight: bold;
    color: #333;
    margin: 0 0 10px;
}

.portfolio-title a {
    color: inherit;
    text-decoration: none;
}

.portfolio-title a:hover {
    text-decoration: underline;
}

.portfolio-text {
    font-size: 16px;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    margin: 0;
}

.display-mobile {
    display: none;
}


.portfolio-button {
    display: inline-block;
    background-color: #28a745;
    color: white;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 5px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s ease, transform 0.3s ease;
    font-size: 14px;
    text-align: center;
    margin: 10px 0;
}

.header-short {
    position: absolute;
    left: 50%;
    transform: translate(-50%, 50%);
}

.portfolio-button:hover {
    background-color: #218838;
}

.special-button {
    background-color: hsl(13, 6%, 69%);
}

.special-button:hover {
    background-color: #cc4627;
}

/* Carousel */
.carousel {
    position: relative;
    width: 100%;
    max-width: 600px;
    margin: auto;
    overflow: hidden;
}

.carousel-inner {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.carousel-item {
    min-width: 100%;
    box-sizing: border-box;
}

.carousel-item img {
    width: 100%;
    display: block;
}

.carousel-control {
    position: absolute;
    top: 50%;
    width: 40px;
    height: 40px;
    background-color: rgba(0, 0, 0, 0.5);
    color: rgb(204, 207, 10);
    border: none;
    font-size: 20px;
    cursor: pointer;
    transform: translateY(-50%);
    z-index: 1;
}

.carousel-control.prev {
    left: 10px;
}

.carousel-control.next {
    right: 10px;
}

/* Lightbox styles */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.lightbox-content {
    position: relative;
}

.lightbox img {
    max-width: 90%;
    max-height: 80vh;
    display: block;
}

.lightbox-close {
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 40px;
    color: white;
    cursor: pointer;
}

/* Translation */
.language-buttons {
    display: flex;
    position: absolute;
    top: 10px;
    right: 10px;
    gap: 5px;
}

.language-buttons .portfolio-button {
    display: inline-block;
    background-color: #28a745;
    color: white;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 5px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s ease, transform 0.3s ease;
    font-size: 14px;
}

.language-buttons .portfolio-button:hover {
    background-color: #218838;
}

.language-selector-index {
    position: absolute;
    right: 1%;
    top:1%;
    margin-left: 10px;
    display: flex;
}

.language-selector {
    position: absolute;
    right: 1%;
    margin-left: 10px;
    display: flex;
}

.button-container {
    text-align: center;
    margin-top: 20px; 
}

@media only screen and (max-width: 767px) {
    img.cover-profile {
        height: 90px;
        margin-top: 75px;
    }

    .portfolio-button {
        padding: 5px 5px;
        font-size: 11px;
    }

    .portfolio-button:hover {
        background-color: #218838;
    }

    .language-buttons .portfolio-button {
        padding: 5px 5px;
        font-size: 11px;
    }
    
    .language-buttons {
        margin-left: auto;
    }
    
    .profile-button {
        display: inline-block;
        margin-top: 20px;
    }

    h1 {
        font-size: 30px;
        margin-top: 6px;
    }
    
    div.cover p {
        margin-top: 2px;
        font-size: 13px;
    }

    .section {
        padding: 20px;
    }
    
    div.section-grise1 {
        padding-bottom: 40px;
    }

    h2 {
        font-size: 30px;
    }

    img.col-contenu {
        width: 100%;
    }
    
    div.col-contenu {
        width: 100%;
        padding-left: 0;
        margin-top: 20px;
    }

    .portfolio-grid {
        padding: 0 10px;
    }

    .portfolio-item {
        display: flex;
        align-items: center;
        text-align: center;
    }

    .portfolio-item img {
        height: 150px;
        margin-bottom: 0px;
    }

    div.frame {
        margin: 0;
        padding: 0;
        box-shadow: none;
    }

    div.frame img {
        width: 70px;
    }

    .portfolio-header {
        flex-direction: row;
        align-items: flex-start;
        text-align: left;
        justify-content: space-between;
    }

    .portfolio-header-title {
        display: flex;
        position: absolute;
        top: 6px;
        text-align: left;
        font-size: 14px;
        padding-left: 4px;
    }

    .header-short {
        margin-top: 75px;
        transform: translateX(-50%);
    }

    a.contact-button {
        padding: 7px 12px;
        margin-top: 22px;
        font-size: 12px;
    }

    h1.portfolio {
        font-size: 30px;
    }
    
    h2.portfolio {
        font-size: 22px;
    }

    img.portfolio {
        width: 100%;
    }

    .display-mobile {
        display: block;
    }
    
}